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

chore(cli): @fern-api/openapi-ir-parser conditionally imports swagger2openapi #5344

Merged
merged 1 commit into from
Dec 5, 2024

Conversation

amckinney
Copy link
Contributor

This updates the @fern-api/openapi-ir-parser package to conditionally import the swagger2openapi package, which brings in a variety of browser-incompatible dependencies. The solution is similar to the one done for prettier here.

This is a simple solution for now, but it prevents supporting Swagger 2.0 in the browser. Moving forward, we could split out the functionality we need from swagger2openapi (i.e. just the convertObj method and its transitive closure), and make it browser compatible, but this at least gets us in a position where we support the browser use cases at hand.

@amckinney amckinney requested a review from dsinghvi as a code owner December 5, 2024 15:22
@amckinney amckinney merged commit ddbb5ee into main Dec 5, 2024
50 checks passed
@amckinney amckinney deleted the amckinney/swagger2openapi branch December 5, 2024 15:35
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