Skip to content

Add support for adding OpenAPI schema for GET requests with a body#1626

Merged
tiangolo merged 4 commits intofastapi:masterfrom
victorphoenix3:get
Jul 19, 2020
Merged

Add support for adding OpenAPI schema for GET requests with a body#1626
tiangolo merged 4 commits intofastapi:masterfrom
victorphoenix3:get

Conversation

@victorphoenix3
Copy link
Copy Markdown
Contributor

@victorphoenix3 victorphoenix3 commented Jun 25, 2020

Related to #713 .

@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 25, 2020

Codecov Report

Merging #1626 into master will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##            master     #1626    +/-   ##
==========================================
  Coverage   100.00%   100.00%            
==========================================
  Files          227       239    +12     
  Lines         6810      7047   +237     
==========================================
+ Hits          6810      7047   +237     
Impacted Files Coverage Δ
fastapi/dependencies/utils.py 100.00% <100.00%> (ø)
fastapi/openapi/constants.py 100.00% <100.00%> (ø)
tests/test_get_request_body.py 100.00% <100.00%> (ø)
tests/main.py 100.00% <0.00%> (ø)
fastapi/utils.py 100.00% <0.00%> (ø)
fastapi/params.py 100.00% <0.00%> (ø)
fastapi/routing.py 100.00% <0.00%> (ø)
tests/test_path.py 100.00% <0.00%> (ø)
fastapi/encoders.py 100.00% <0.00%> (ø)
tests/test_query.py 100.00% <0.00%> (ø)
... and 91 more

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 543ef77...7ba8167. Read the comment docs.

@victorphoenix3
Copy link
Copy Markdown
Contributor Author

@IamCathal could you take a look at this?

Comment thread tests/test_get_request_body_schema.py Outdated
Copy link
Copy Markdown
Contributor

@rkbeatss rkbeatss Jun 25, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@victorphoenix3 i think this is where the coverage is missing so try adding # pragma: no cover here

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hey thanks @rkbeatss . It worked!

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the help @rkbeatss ! 🤓

@victorphoenix3 victorphoenix3 force-pushed the get branch 3 times, most recently from f416e25 to 065be3c Compare July 2, 2020 08:57
@victorphoenix3
Copy link
Copy Markdown
Contributor Author

@tiangolo The PR is ready for review.

@tiangolo tiangolo changed the title Add Test for get request body's openapi schema Add support for adding OpenAPI schema for GET requests with a body Jul 19, 2020
@tiangolo tiangolo merged commit 2b47f3e into fastapi:master Jul 19, 2020
@tiangolo
Copy link
Copy Markdown
Member

Awesome @victorphoenix3 ! 🚀 🎉

I updated the test to check that it actually can receive a body in a GET request and to keep the same style of testing OpenAPI from other tests.

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.

3 participants