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

Fix openapi >=3 versions compatibility #91

Merged
merged 6 commits into from Dec 11, 2020

Conversation

cgaunet
Copy link
Contributor

@cgaunet cgaunet commented Dec 10, 2020

[BUG]:
When generating the openAPI JSON document, it put Pydantic definitions in a part called "definitions". This is deprecated and not compatible with openAPI versions superior to 3.

This Pull Request aims to bring back compatibility between the openapi.json generated and the specifications of openAPI V3

This is now possible thanks to pydantic/pydantic#1479

Thank you a lot for your awesome library that helps us on https://github.com/pass-culture/pass-culture-api to coordinate the 3 frontend apps and the api.
I hope that you will enjoy this contribution :)

@kemingy
Copy link
Member

kemingy commented Dec 11, 2020

LGTM. Thanks for your contribution.

@kemingy kemingy changed the base branch from master to dev December 11, 2020 00:44
@kemingy kemingy merged commit f37afe9 into 0b01001001:dev Dec 11, 2020
@kemingy kemingy linked an issue Dec 11, 2020 that may be closed by this pull request
xordoquy added a commit to pass-culture/pass-culture-api that referenced this pull request Dec 11, 2020
Spectree has a small imcompatibility with the OpenAPI 3.0.3:
Nested models are generated as `/definitions/{model}` while
no such path exists within OpenAPI 3.0.x
All models should be under `/components/schemas/`.
While this has been reported and fixed upstream with PR:
0b01001001/spectree#91
we need to fix it while waiting the proper solution.
xordoquy added a commit to pass-culture/pass-culture-api that referenced this pull request Dec 11, 2020
Spectree has a small imcompatibility with the OpenAPI 3.0.3:
Nested models are generated as `/definitions/{model}` while
no such path exists within OpenAPI 3.0.x
All models should be under `/components/schemas/`.
While this has been reported and fixed upstream with PR:
0b01001001/spectree#91
we need to fix it while waiting the proper solution.
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.

[BUG] Incompatibility with OpenAPI V3 specifications
2 participants