We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open API 3.1 supports defining tuples via Json Schema prefixItems.
prefixItems
Given the following TypeSpec:
model Foo { tuple: [string, string]; }
We can emit an Open API 3.1 schema that looks like this:
Foo: type: object properties: tuple: type: array prefixItems: - type: string - type: string required: - tuple
This matches what our json schema emitter currently emits.
For reference, our Open API 3.0 emitter does not support emitting tuples due to the lack of prefixItems and instead outputs this:
Foo: type: object required: - tuple properties: tuple: type: array items: {}
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Open API 3.1 supports defining tuples via Json Schema
prefixItems
.Given the following TypeSpec:
We can emit an Open API 3.1 schema that looks like this:
This matches what our json schema emitter currently emits.
For reference, our Open API 3.0 emitter does not support emitting tuples due to the lack of
prefixItems
and instead outputs this:The text was updated successfully, but these errors were encountered: