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

feat(cli): openapi directly to ir #6139

Merged
merged 20 commits into from
Feb 24, 2025
Merged

Conversation

dsinghvi
Copy link
Member

@dsinghvi dsinghvi commented Feb 22, 2025

This PR started as a thought experiment -- what would it take to have Docs + SDKs share the OpenAPI parser and profit off of the same improvements.

In this PR, we've defined something that takes an OpenAPI spec and converts it to IR. It handles schema conversions, endpoint conversions (still multipart/streaming left to do), as well as converting servers.

The experiment proved a couple things:

  1. The code is drastically simplified using this approach
  2. This will save time for adding more features b/c you don't have to add it to the Fern Definition
  3. It is eventually possible to delete the old OpenAPI parser b/c it will be feasible to make sure that the new parser respects all the feature flags of the old parser
  4. Validation built in -- with an ErrorCollector interface its going to be so much easier to write validation rules and print them out for users (architecture suggested by alex)

Copy link

github-actions bot commented Feb 23, 2025

@fern-support fern-support force-pushed the dsinghvi/openapi-directly-to-ir branch from c518e14 to 6812400 Compare February 23, 2025 23:58
@dsinghvi dsinghvi changed the title <in progress> feat(cli): openapi directly to ir Feb 24, 2025
@dsinghvi dsinghvi marked this pull request as ready for review February 24, 2025 00:01
@dsinghvi dsinghvi requested a review from amckinney February 24, 2025 00:01
@dsinghvi dsinghvi merged commit c624f0a into main Feb 24, 2025
16 checks passed
@dsinghvi dsinghvi deleted the dsinghvi/openapi-directly-to-ir branch February 24, 2025 04:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants