Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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

Merged
tiangolo merged 2 commits into
fastapi:masterfrom
songzhi:patch-1
Feb 4, 2020
Merged

OpenAPI schema generation: Don't convert all enums into str#906
tiangolo merged 2 commits into
fastapi:masterfrom
songzhi:patch-1

Conversation

@songzhi

@songzhi songzhi commented Jan 22, 2020

Copy link
Copy Markdown
Contributor

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

codecov Bot commented Jan 22, 2020

Copy link
Copy Markdown

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 fastapi:master Feb 4, 2020
@tiangolo

tiangolo commented Feb 4, 2020

Copy link
Copy Markdown
Member

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.

2 participants