Repository navigation
feat(openapi)!: migrate to oas 0.3 and OpenAPI 3.2 - #120
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Gotcha still emitted OpenAPI 3.0 schemas after the release of
oas 0.3. This migrates the dependency and generated documents together to OpenAPI 3.2.0. For example,Option<Record>now producesanyOf: [$ref(Record), {type: null}], so null is accepted without weakening the shared Record component.gotcha_core::nullable_schema; emit numeric exclusive bounds, schemaexamples, JSON null forJson<()>, and an unconstrained schema for raw binary bodies.SchemaType/SchemaValue. Preserve boolean schemas and reference siblings, finalize references insideitemSchema/contentSchema, and leave example/default payloads untouched.Schematicin core and preserve standalone library, facade, and renamed-dependency support. Document source compatibility changes and the supported subset inMIGRATION.md.Validation
All 11 GitHub CI checks passed for
f91cfc2.-D warnings, and rustdoc with-D warnings.jsonschemaagainst the official OpenAPI 3.2 schema-base. Verified acceptance/rejection of nulls, recursive values, enum values, and exclusive numeric boundaries.@scalar/api-reference1.68.0. An explicit 1.68.0 browser probe received and displayed two real SSE events in the request client, but the documentation still showed anitemSchema-only SSE response as “No Body”. Upstream scalar/scalar#10178 adds streaming item-schema examples and remains unmerged/unreleased; there is no stable viewer upgrade for this limitation yet. Redoc fails with “Unsupported OpenAPI Version: 3.2.0”.This establishes the schema foundation for #86. SSE annotations and WebSocket/AsyncAPI contracts remain separate; this does not claim complete OpenAPI 3.2 model or viewer support.
Closes #119.