Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Additional responses can be status groups or "default"#435

Merged
tiangolo merged 3 commits intofastapi:masterfrom
divums:status_codes
Aug 30, 2019
Merged

Additional responses can be status groups or "default"#435
tiangolo merged 3 commits intofastapi:masterfrom
divums:status_codes

Conversation

@divums
Copy link
Contributor

@divumsdivums commentedAug 13, 2019
edited
Loading

Catching exception when generating OpenAPI specification. Added status groups and "default" as possible key for the additional responses.

If merged, this issuefixes#428

@codecov
Copy link

codecovbot commentedAug 13, 2019
edited
Loading

Codecov Report

Merging#435 intomaster willnot change coverage.
The diff coverage is100%.

Impacted file tree graph

@@          Coverage Diff          @@##           master   #435   +/-   ##=====================================  Coverage     100%   100%           =====================================  Files         240    244    +4       Lines        5626   5707   +81     =====================================+ Hits         5626   5707   +81
Impacted FilesCoverage Δ
fastapi/openapi/utils.py100% <100%> (ø)⬆️
tests/test_additional_responses_bad.py100% <100%> (ø)
tests/test_additional_responses_router.py100% <100%> (ø)⬆️
fastapi/dependencies/utils.py100% <0%> (ø)⬆️
fastapi/routing.py100% <0%> (ø)⬆️
tests/test_repeated_dependency_schema.py100% <0%> (ø)
tests/test_empty_router.py100% <0%> (ø)
tests/test_skip_defaults.py100% <0%> (ø)

Continue to review full report at Codecov.

Legend -Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing data
Powered byCodecov. Last update033bc2a...e673787. Read thecomment docs.

@codecov
Copy link

codecovbot commentedAug 13, 2019

Codecov Report

Merging#435 intomaster willdecrease coverage by0.01%.
The diff coverage is88.88%.

Impacted file tree graph

@@            Coverage Diff             @@##           master     #435      +/-   ##==========================================- Coverage     100%   99.98%   -0.02%==========================================  Files         240      240                Lines        5626     5632       +6     ==========================================+ Hits         5626     5631       +5- Misses          0        1       +1
Impacted FilesCoverage Δ
tests/test_additional_responses_router.py100% <100%> (ø)⬆️
fastapi/openapi/utils.py99.38% <87.5%> (-0.62%)⬇️

Continue to review full report at Codecov.

Legend -Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing data
Powered byCodecov. Last update033bc2a...7f915cc. Read thecomment docs.

@tiangolotiangolo merged commit73dbbea intofastapi:masterAug 30, 2019
@tiangolo
Copy link
Member

Awesome, thanks@divums ! Good job! 🚀 🍰

I updated it a bit, to use uppercase instead of lowercase, to conform with the spec:https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#patterned-fields-1

And I augmented the tests to include some more of these cases.

And thanks a lot@dmontagu for the code review and help here! 👏 💪 🍰

@tiangolotiangolo mentioned this pull requestAug 30, 2019
@tiangolo
Copy link
Member

I realized I introduced a bug making it"DEFAULT" instead of"default", while making the status code ranges uppercase.

But I just fixed it in#489 🐛

I also added extra tests there to include"default" and other status codes at the same time and discovered another bug in the models. But it's fixed now. 😅 🚀

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@tiangolotiangolotiangolo left review comments

@dmontagudmontagudmontagu left review comments

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

OpenAPI: response keys are limited to be status codes

3 participants

@divums@tiangolo@dmontagu

Comments


[8]ページ先頭

©2009-2026 Movatter.jp