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

Updates tsp-openapi3 to emit main.tsp even when formatter fails #3794

Merged
merged 3 commits into from
Jul 10, 2024

Conversation

chrisradek
Copy link
Member

@chrisradek chrisradek commented Jul 9, 2024

This updates the tsp-openapi3 CLI so that it emits main.tsp even when the formatter detects an issue. The CLI will still throw the error after it is done emitting the file.

The convertOpenAPI3Document function used by the website does not throw on formatter errors - the playground will highlight any TSP errors already.

Playground example with bad emission:
image

@microsoft-github-policy-service microsoft-github-policy-service bot added the emitter:openapi3 Issues for @typespec/openapi3 emitter label Jul 9, 2024
@chrisradek chrisradek enabled auto-merge July 9, 2024 23:17
@azure-sdk
Copy link
Collaborator

All changed packages have been documented.

  • @typespec/openapi3
Show changes

@typespec/openapi3 - fix ✏️

Updates tsp-openapi3 to always emit main.tsp when formatting encounters an error.

@azure-sdk
Copy link
Collaborator

You can try these changes at https://cadlplayground.z22.web.core.windows.net/prs/3794/

Check the website changes at https://tspwebsitepr.z22.web.core.windows.net/prs/3794/

@chrisradek chrisradek added this pull request to the merge queue Jul 9, 2024
Merged via the queue into microsoft:main with commit 181dd8a Jul 10, 2024
22 checks passed
@chrisradek chrisradek deleted the tsp-openapi3-emit-on-bad-format branch July 10, 2024 00:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
emitter:openapi3 Issues for @typespec/openapi3 emitter
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants