Skip to content

fix(weave): resolve recursive LiteralOperation schema to fix Mintlify warnings#6955

Open
rajkumar-prog wants to merge 1 commit into
wandb:masterfrom
rajkumar-prog:fix/openapi-literal-ref
Open

fix(weave): resolve recursive LiteralOperation schema to fix Mintlify warnings#6955
rajkumar-prog wants to merge 1 commit into
wandb:masterfrom
rajkumar-prog:fix/openapi-literal-ref

Conversation

@rajkumar-prog
Copy link
Copy Markdown

Problem

Fixes #5619

The LiteralOperation schema in sdks/node/weave.openapi.json contains recursive self-references:

"additionalProperties": { "$ref": "#/components/schemas/LiteralOperation" }
"items": { "$ref": "#/components/schemas/LiteralOperation" }

Static OpenAPI tooling (including Mintlify) cannot resolve infinite recursive schemas and emits warnings during documentation builds.

Root cause

LiteralOperation represents a JSON literal — a value that can be a string, number, boolean, object, array, or null. Objects and arrays within a literal can themselves contain arbitrary values, but the schema modelled this as a recursive reference to LiteralOperation. Static tools cannot follow infinite recursion, unlike a runtime parser.

Fix

Replaced the recursive $ref entries with open schemas that are semantically equivalent for a JSON literal:

  • "additionalProperties": true — object values are unconstrained
  • "items": {} — array elements are unconstrained

This matches the runtime behaviour (any JSON value is valid) while remaining resolvable by static tooling.

Note: This change only affects the generated OpenAPI schema used for documentation. It does not touch any runtime validation logic.

Changes

  • sdks/node/weave.openapi.json — 2 lines changed

@rajkumar-prog rajkumar-prog requested review from a team as code owners May 25, 2026 09:39
@wandbot-3000
Copy link
Copy Markdown

wandbot-3000 Bot commented May 25, 2026

This PR requires manual approval from a wandb user to run all CI checks.

To see the current diff, click here.

To approve CI for this PR as of this commit, comment:

/approve 5416f1ccef5fbe496078c96ebbb040b334818cd2

@rajkumar-prog
Copy link
Copy Markdown
Author

/approve be45200

@wandbot-3000
Copy link
Copy Markdown

wandbot-3000 Bot commented May 26, 2026

@rajkumar-prog rajkumar-prog force-pushed the fix/openapi-literal-ref branch from be45200 to 5416f1c Compare May 27, 2026 09:36
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.

OpenAPI spec contains recursive schemas that cause documentation build warnings in Mintlify

1 participant