Skip to content

fix: resolve duplicate CreateMessageRequest schema and YAML indentation errors - #166

Merged
b4s36t4 merged 1 commit into
masterfrom
fix/openapi-duplicate-create-message-request
Oct 22, 2026
Merged

b4s36t4 merged 1 commit into
masterfrom
fix/openapi-duplicate-create-message-request

Conversation

@b4s36t4

@b4s36t4 b4s36t4 commented Oct 22, 2026

Copy link
Copy Markdown

Problem

mint validate in docs-core fails against the current master spec:

error duplicated mapping key (32320:5)
  32320 |     CreateMessageRequest:

#165 added the Anthropic Messages API schema as CreateMessageRequest, but that name is already used by the Assistants API (/threads/{thread_id}/messages, additional_messages, thread creation).

Strict YAML parsers (js-yaml, Redocly) also reject four guardrail examples with deficient indentation: the closing ] of a multi-line flow sequence was at the same indentation as its key.

Changes

  • Renamed the Anthropic schema to CreateAnthropicMessageRequest and updated its $ref on POST /messages plus the mention in CountMessageTokensRequest. The Assistants API schema keeps the original name.
  • Indented the four closing ] brackets (whitespace only).

Verification

  • npx js-yaml openapi.yaml parses cleanly.
  • mint validate in docs-core passes against this spec (build validation passed).

…on errors

The Anthropic Messages API schema added in #165 reused the name
CreateMessageRequest, which already exists for the Assistants API.
The duplicate mapping key breaks strict YAML parsing and fails
mint validate in docs. Rename the Anthropic schema to
CreateAnthropicMessageRequest and update its references.

Also indent four closing flow-sequence brackets in guardrail examples
that strict parsers reject with 'deficient indentation'.
Copilot AI balanced review requested due to automatic review settings October 22, 2026 17:05

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

The targeted schema rename and indentation fixes are consistent, with no unresolved review findings.

No open issues 🎉

What changed in this PR

This PR removes a schema-name collision between the Anthropic Messages and Assistants APIs and fixes YAML indentation that blocked strict parsing and documentation validation.

Changes:

  • Renames the Anthropic request schema to CreateAnthropicMessageRequest and updates the /messages reference, preserving the Assistants schema name.
  • Updates the schema name mentioned in the token-count request description.
  • Corrects closing-bracket indentation in four guardrail examples without changing their values.
File Description
openapi.yaml Separates the request schema names and corrects guardrail example indentation.

Review effort: Balanced

@b4s36t4
b4s36t4 merged commit c3dda80 into master Oct 22, 2026
2 checks passed
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.

3 participants