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

OpenAPI schema generation: Don't convert all enums into str #906

Merged
merged 2 commits into from
Feb 4, 2020
Merged

OpenAPI schema generation: Don't convert all enums into str #906

merged 2 commits into from
Feb 4, 2020

Conversation

songzhi
Copy link
Contributor

@songzhi songzhi commented Jan 22, 2020

Before doing this,the type of values in enum could be at odds with type field.

Before doing this,the type of  values in `enum` could be at odds with `type` field.
@codecov
Copy link

codecov bot commented Jan 22, 2020

Codecov Report

Merging #906 into master will decrease coverage by 0.07%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #906      +/-   ##
==========================================
- Coverage     100%   99.92%   -0.08%     
==========================================
  Files         293      293              
  Lines        7692     7701       +9     
==========================================
+ Hits         7692     7695       +3     
- Misses          0        6       +6
Impacted Files Coverage Δ
fastapi/openapi/models.py 100% <100%> (ø) ⬆️
fastapi/concurrency.py 77.77% <0%> (-22.23%) ⬇️
tests/test_filter_pydantic_sub_model.py 100% <0%> (ø) ⬆️
fastapi/utils.py 100% <0%> (ø) ⬆️

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 55afb70...47e6e0a. Read the comment docs.

@songzhi songzhi changed the title Don't convert all enums into str OpenAPI schema generation: Don't convert all enums into str Jan 23, 2020
@tiangolo tiangolo merged commit a448bd6 into tiangolo:master Feb 4, 2020
@tiangolo
Copy link
Owner

tiangolo commented Feb 4, 2020

Thanks! Good point 🔍 🚀 I updated it to allow any type as subtype of List.

Thanks for your contribution! 🍰

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

2 participants