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

✨ Update OpenAPI models, supporting recursive models and extensions #3628

Merged
merged 3 commits into from
Jul 29, 2021

Conversation

tiangolo
Copy link
Owner

@tiangolo tiangolo commented Jul 29, 2021

✨ Update OpenAPI models, supporting recursive models and extensions

This updates all the models that are allowed to have OpenAPI Specification Extensions.

It also updates the models to use recursive models when necessary instead of the previous workaround of double models. The previous version/current of the models was made when Pydantic didn't have support for recursive models, long before Pydantic versions 1.x. But as in now supports them and FastAPI already requires a recent version of Pydantic, these models can be updated. 🚀

@codecov
Copy link

codecov bot commented Jul 29, 2021

Codecov Report

Merging #3628 (2bb1326) into master (e726b7b) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master     #3628   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          408       408           
  Lines        10196     10229   +33     
=========================================
+ Hits         10196     10229   +33     
Impacted Files Coverage Δ
fastapi/openapi/models.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e726b7b...2bb1326. Read the comment docs.

@github-actions github-actions bot temporarily deployed to commit July 29, 2021 20:49 Inactive
@tiangolo tiangolo enabled auto-merge (squash) July 29, 2021 20:53
@github-actions github-actions bot temporarily deployed to commit July 29, 2021 20:55 Inactive
@github-actions
Copy link
Contributor

github-actions bot commented Jul 29, 2021

@github-actions github-actions bot temporarily deployed to commit July 29, 2021 20:59 Inactive
@tiangolo tiangolo merged commit 97fa743 into master Jul 29, 2021
@tiangolo tiangolo deleted the update-openapi-models branch July 29, 2021 20:59
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.

None yet

1 participant