Skip to content

feat:Update documentation references in OpenAPI schema#154

Merged
HavenDV merged 1 commit intomainfrom
bot/update-openapi_202603070148
Mar 7, 2026
Merged

feat:Update documentation references in OpenAPI schema#154
HavenDV merged 1 commit intomainfrom
bot/update-openapi_202603070148

Conversation

@HavenDV
Copy link
Contributor

@HavenDV HavenDV commented Mar 7, 2026

Summary by CodeRabbit

  • Documentation
    • Updated API documentation references to point to the latest guides and resources for features including language detection, translation, custom formatting, and content moderation.
    • Enhanced field descriptions throughout the API documentation for improved clarity and easier navigation to relevant documentation sections.

@HavenDV HavenDV merged commit 053384b into main Mar 7, 2026
3 of 4 checks passed
@HavenDV HavenDV deleted the bot/update-openapi_202603070148 branch March 7, 2026 01:49
@coderabbitai
Copy link

coderabbitai bot commented Mar 7, 2026

Walkthrough

Updated descriptions and documentation references across numerous schema fields in the OpenAPI specification file to point to current documentation paths. Changes include revised URLs for language-related fields, feature descriptors, translation, speaker identification, and transcript-related schemas. No functional or structural changes to the API.

Changes

Cohort / File(s) Summary
OpenAPI Documentation Updates
src/libs/AssemblyAI/openapi.yaml
Updated description strings and documentation links for schema fields. References redirected from older model-specific pages to current paths (pre-recorded-audio, language-detection, content-moderation, speech-understanding, translation sections). Affected areas include language fields, Auto Chapters, Key Phrases, Content Moderation, Topic Detection, Speaker Identification, Translation, PII features, and Transcript-related schemas.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

Poem

📚✨ The docs now dance with links so bright,
Each schema field now points aright,
From old paths worn to new paths clean,
The clearest API ever seen! 🐰🎉

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title Check ✅ Passed Title check skipped as CodeRabbit has written the PR title.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch bot/update-openapi_202603070148

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai bot changed the title feat:@coderabbitai feat:Update documentation references in OpenAPI schema Mar 7, 2026
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/libs/AssemblyAI/openapi.yaml (1)

3149-3157: ⚠️ Potential issue | 🟠 Major

Model translated_texts as a map, not a fixed language_code property.

The updated description says this object is keyed by language code, but the schema still defines a single literal language_code property. That will generate the wrong response type in docs/SDKs, especially since TranscriptUtterance.translated_texts already models the same concept as a string map.

🛠 Proposed fix
         translated_texts:
           # x-label: Translated text
           type: object
           description: Translated text keyed by language code. See [Translation](https://www.assemblyai.com/docs/speech-understanding/translation) for more details.
-          properties:
-            language_code:
-              x-label: Language code
-              type: string
-              description: Translated text for this language code
+          additionalProperties:
+            type: string
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/libs/AssemblyAI/openapi.yaml` around lines 3149 - 3157, The schema for
translated_texts is incorrectly modeled with a fixed property language_code;
change it to a map keyed by language codes by removing the literal language_code
property and using additionalProperties: { type: string } (or patternProperties
if you want a language-code regex) so translated_texts becomes an object map of
strings (matching how TranscriptUtterance.translated_texts is modeled) and
update the description/labels accordingly.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/libs/AssemblyAI/openapi.yaml`:
- Around line 1389-1392: The description for the fallback_language field in
src/libs/AssemblyAI/openapi.yaml contradicts its schema: the field is defined as
type: string (fallback_language) with default: "auto", but the prose instructs
consumers to pass ["auto"]. Update the description text for the
fallback_language property (both instances referencing fallback_language) to
indicate the single string value "auto" (not an array ["auto"]) and ensure the
wording matches the schema and default; no schema change is required—only
correct the descriptive text around fallback_language to reference the string
"auto".
- Around line 1467-1473: The docs for redact_pii_sub advertise an `entity_type`
option that is not allowed by the SubstitutionPolicy enum; update the text to
match the enum (use `entity_name` and `hash`) or alternatively add `entity_type`
to the SubstitutionPolicy enum—make the change consistently for the
redact_pii_sub entries (the one under redact_pii_sub and the other occurrence
around lines 2944-2947) and ensure the description and oneOf/default reflect the
same allowed values as the SubstitutionPolicy schema.

---

Outside diff comments:
In `@src/libs/AssemblyAI/openapi.yaml`:
- Around line 3149-3157: The schema for translated_texts is incorrectly modeled
with a fixed property language_code; change it to a map keyed by language codes
by removing the literal language_code property and using additionalProperties: {
type: string } (or patternProperties if you want a language-code regex) so
translated_texts becomes an object map of strings (matching how
TranscriptUtterance.translated_texts is modeled) and update the
description/labels accordingly.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 9eb41ff6-4b7f-4226-9454-a254b050198b

📥 Commits

Reviewing files that changed from the base of the PR and between 6f8053e and 5edbd44.

⛔ Files ignored due to path filters (25)
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.AutoHighlightsResult2.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.ContentSafetyLabelsResult.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.CustomFormattingRequestBody.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.CustomFormattingRequestBodyCustomFormatting.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.RedactPiiAudioQuality.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.SentimentAnalysisResult.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.SpeakerIdentificationRequestBody.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.SpeakerIdentificationRequestBodySpeakerIdentification.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.SpeakerIdentificationRequestBodySpeakerIdentificationSpeakerType.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.SubstitutionPolicy.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.TopicDetectionModelResult.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.Transcript.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.TranscriptLanguageCode.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.TranscriptLanguageDetectionOptions.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.TranscriptOptionalParams.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.TranscriptOptionalParamsLanguageDetectionOptions.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.TranscriptOptionalParamsRedactPiiAudioOptions.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.TranscriptOptionalParamsSpeakerOptions.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.TranscriptOptionalParamsSpeechUnderstanding.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.TranscriptSentence.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.TranscriptSpeechUnderstanding.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.TranscriptTranslatedTexts.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.TranscriptWord.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.TranslationRequestBody.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.TranslationRequestBodyTranslation.g.cs is excluded by !**/generated/**
📒 Files selected for processing (1)
  • src/libs/AssemblyAI/openapi.yaml

Comment on lines 1389 to 1392
x-label: Fallback language
description: |
If the detected language of the audio file is not in the list of expected languages, the `fallback_language` is used. Specify `["auto"]` to let our model choose the fallback language from `expected_languages` with the highest confidence score.
If the detected language of the audio file is not in the list of expected languages, the `fallback_language` is used. Specify `["auto"]` to let our model choose the fallback language from `expected_languages` with the highest confidence score. See [Automatic Language Detection](https://www.assemblyai.com/docs/pre-recorded-audio/language-detection) for more details.
type: string
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Document fallback_language as a string, not an array.

Line 1391 and Line 2877 now tell users to pass ["auto"], but this field is declared as type: string with default: "auto". That makes the published contract self-contradictory and will lead consumers to send an invalid payload.

🛠 Proposed fix
-                If the detected language of the audio file is not in the list of expected languages, the `fallback_language` is used. Specify `["auto"]` to let our model choose the fallback language from `expected_languages` with the highest confidence score. See [Automatic Language Detection](https://www.assemblyai.com/docs/pre-recorded-audio/language-detection) for more details.
+                If the detected language of the audio file is not in the list of expected languages, the `fallback_language` is used. Specify `"auto"` to let our model choose the fallback language from `expected_languages` with the highest confidence score. See [Automatic Language Detection](https://www.assemblyai.com/docs/pre-recorded-audio/language-detection) for more details.

Also applies to: 2875-2878

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/libs/AssemblyAI/openapi.yaml` around lines 1389 - 1392, The description
for the fallback_language field in src/libs/AssemblyAI/openapi.yaml contradicts
its schema: the field is defined as type: string (fallback_language) with
default: "auto", but the prose instructs consumers to pass ["auto"]. Update the
description text for the fallback_language property (both instances referencing
fallback_language) to indicate the single string value "auto" (not an array
["auto"]) and ensure the wording matches the schema and default; no schema
change is required—only correct the descriptive text around fallback_language to
reference the string "auto".

Comment on lines 1467 to 1473
redact_pii_sub:
x-label: Redact PII substitution
description: The replacement logic for detected PII, can be `entity_type` or `hash`. See [PII redaction](https://www.assemblyai.com/docs/models/pii-redaction) for more details.
description: The replacement logic for detected PII, can be `entity_type` or `hash`. See [PII redaction](https://www.assemblyai.com/docs/pii-redaction) for more details.
oneOf:
- $ref: "#/components/schemas/SubstitutionPolicy"
- type: "null"
default: hash
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Keep redact_pii_sub docs aligned with the enum values.

These descriptions now say the field accepts entity_type, but SubstitutionPolicy still only allows entity_name | hash (see Line 1993). That means the generated docs will advertise a value the schema rejects.

🛠 Proposed fix
-          description: The replacement logic for detected PII, can be `entity_type` or `hash`. See [PII redaction](https://www.assemblyai.com/docs/pii-redaction) for more details.
+          description: The replacement logic for detected PII, can be `entity_name` or `hash`. See [PII redaction](https://www.assemblyai.com/docs/pii-redaction) for more details.

Also applies to: 2944-2947

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/libs/AssemblyAI/openapi.yaml` around lines 1467 - 1473, The docs for
redact_pii_sub advertise an `entity_type` option that is not allowed by the
SubstitutionPolicy enum; update the text to match the enum (use `entity_name`
and `hash`) or alternatively add `entity_type` to the SubstitutionPolicy
enum—make the change consistently for the redact_pii_sub entries (the one under
redact_pii_sub and the other occurrence around lines 2944-2947) and ensure the
description and oneOf/default reflect the same allowed values as the
SubstitutionPolicy schema.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant