Skip to content
New issue

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

update OpenAPI.extension to emit schemas for types #6229

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

chrisradek
Copy link
Member

Fixes #6077

Tasks remaining:

  • 0.66.0 released
  • typespec-autorest changes

Keeping in draft so this doesn't get merged until after the upcoming release.

@azure-sdk
Copy link
Collaborator

All changed packages have been documented.

  • @typespec/openapi
  • @typespec/openapi3
Show changes

@typespec/openapi - breaking ✏️

Updates the @extension decorator to accept Types in addition to Values. Model and Tuple expressions that were previously treated as Values are now treated as Types.

@typespec/openapi3 - breaking ✏️

Updates the @extension behavior to emit Open API schemas for passed in Types. Values will continue to be emitted as raw data. Model and Tuple expressions that were previously treated as Values are now treated as Types.,> ,> Now the following TypeSpec:,> tsp,> @OpenAPI.extension("x-value", "custom value"),> @OpenAPI.extension("x-schema", typeof "custom value"),> model Foo {},> ,> emits the following Open API:,> yaml,> Foo:,> type: object,> x-value: custom value,> x-schema:,> type: string,> enum:,> - custom value,>

@azure-sdk
Copy link
Collaborator

You can try these changes here

🛝 Playground 🌐 Website 🛝 VSCode Extension

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/json-schema - @extension alignment - emit schemas
2 participants