Skip to content

fix(openapi): correct YAML quote indentation for spec compliance#414

Open
abdelhadi703 wants to merge 1 commit into
mistralai:mainfrom
abdelhadi703:fix/openapi-yaml-validation
Open

fix(openapi): correct YAML quote indentation for spec compliance#414
abdelhadi703 wants to merge 1 commit into
mistralai:mainfrom
abdelhadi703:fix/openapi-yaml-validation

Conversation

@abdelhadi703

Copy link
Copy Markdown

Summary

Fixes closing single quotes in multiline YAML strings within openapi.yaml that were incorrectly placed at column 0 instead of matching the indentation level of their opening quotes (24 spaces).

Changes

  • Fixed 5 closing single quotes in the OCR endpoint (/v1/ocr) example response that had incorrect indentation (lines 1984, 2001, 2022, 2039, 2050)
  • These quotes terminated multiline markdown field values in the userExample response

Why

While PyYAML tolerates closing quotes at any indentation level, stricter YAML parsers reject this as invalid YAML syntax. The incorrect indentation makes the OpenAPI spec non-portable across different YAML processing tools.

Verification

  • Validated the corrected file parses as valid YAML (yaml.safe_load)
  • Validated against OpenAPI 3.1 specification using openapi-spec-validator
  • Confirmed all data content (markdown text, page counts, etc.) remains identical after the fix

Fixes #379

Note: Issue #273 (EmbeddingResponse items array vs object) appears to have been resolved in a previous docs update — the current openapi.yaml already uses the correct object syntax for items.

Fix closing single quotes in multiline YAML strings that were placed at
column 0 instead of matching the indentation level of their opening quotes
(24 spaces). This affected 5 multiline markdown content strings in the
OCR endpoint example response.

While PyYAML accepts this, stricter YAML parsers may reject the
incorrect indentation, making the spec non-portable.

Fixes mistralai#379
@vercel

vercel Bot commented Mar 2, 2026

Copy link
Copy Markdown

@abdelhadi703 is attempting to deploy a commit to the Mistral AI Team on Vercel.

A member of the Team first needs to authorize it.

@abdelhadi703

Copy link
Copy Markdown
Author

Hi @mistralai/team,

Gentle ping on this OpenAPI spec fix. It corrects YAML quote indentation for spec compliance.

Ensures proper parsing by tools. Thanks!

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.

[API] OpenApi spec is not yaml valid

1 participant