Skip to content

Support YAML OpenAPI Specs in Addition to JSON #111

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

Closed
bowenwr opened this issue Jul 30, 2020 · 1 comment · Fixed by #127
Closed

Support YAML OpenAPI Specs in Addition to JSON #111

bowenwr opened this issue Jul 30, 2020 · 1 comment · Fixed by #127
Labels
✨ enhancement New feature or improvement 👋 good first issue Good for newcomers
Milestone

Comments

@bowenwr
Copy link
Contributor

bowenwr commented Jul 30, 2020

Is your feature request related to a problem? Please describe.

We maintain our OpenAPI spec in YAML, which is supported by many spec validators and other OpenAPI tooling. It would be great to able to generate the client directly from it instead of relying on conversion.

Describe the solution you'd like
Be able to directly import YAML like

openapi-python-client generate --path openapi.yaml

Describe alternatives you've considered

Currently during CI, we're exporting YAML to JSON like:

yq -j -P r openapi.yaml > openapi.json

However, this is potentially unsafe since YAML is a superset of JSON and supports some features.

@bowenwr bowenwr added the ✨ enhancement New feature or improvement label Jul 30, 2020
@dbanty dbanty added the 👋 good first issue Good for newcomers label Jul 31, 2020
@dbanty dbanty added this to the 0.5.0 milestone Jul 31, 2020
dbanty added a commit that referenced this issue Aug 5, 2020
dbanty added a commit that referenced this issue Aug 5, 2020
@bowenwr
Copy link
Contributor Author

bowenwr commented Aug 5, 2020

Awesome, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ enhancement New feature or improvement 👋 good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants