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

OpenAPI3 with emitter framework (for schemas) #2547

Merged

Conversation

timotheeguerin
Copy link
Member

@timotheeguerin timotheeguerin commented Oct 7, 2023

fix #2563
Laborious conversion of the openapi3 emitter to use the emitter framework and hopefully have a cleaner experience

TODO:

  • There is some issues with cyclic types where the placeholder are not resolved, not sure if this is an issue with the emitter framework
  • review the emitter framework changes
    • Add test for that

@github-actions
Copy link
Contributor

github-actions bot commented Oct 7, 2023

Changes in this PR will be published to the following url to try(check status of TypeSpec Pull Request Try It pipeline for publish status):
Playground: https://cadlplayground.z22.web.core.windows.net/prs/2547/

Website: https://tspwebsitepr.z22.web.core.windows.net/prs/2547/

@timotheeguerin timotheeguerin changed the title [Wip] OpenAPI3 with emitter framework (for schemas) OpenAPI3 with emitter framework (for schemas) Oct 30, 2023
@timotheeguerin timotheeguerin marked this pull request as ready for review October 30, 2023 19:07
return sourceFiles;
},

emitType(type, context?: ContextState) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't you need to handle context's lexicalContext as well?

Copy link
Member

@bterlson bterlson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like a great improvement to me!

@timotheeguerin timotheeguerin merged commit 6230415 into microsoft:main Nov 16, 2023
10 checks passed
@timotheeguerin timotheeguerin deleted the openapi3/emitter-framework branch November 16, 2023 01:27
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.

Migrate openapi3 emitter to use emitter framework
2 participants