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

Add include_in_schema parameter to headers to allow exclusion from OpenAPI spec #3012

Closed

Conversation

astraldawn
Copy link
Contributor

Partially addresses #1708

Have the same use case as described by @mnorrsken

We have a header with auth info thats always sent from our API manager to our backend. 
I want to consume this header in my API but I don't want it to show up in the docs.

@codecov
Copy link

codecov bot commented Mar 29, 2021

Codecov Report

Merging #3012 (f34b9e1) into master (6f72a27) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master     #3012   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          243       244    +1     
  Lines         7419      7431   +12     
=========================================
+ Hits          7419      7431   +12     
Impacted Files Coverage Δ
fastapi/param_functions.py 100.00% <ø> (ø)
fastapi/openapi/utils.py 100.00% <100.00%> (ø)
fastapi/params.py 100.00% <100.00%> (ø)
...st_tutorial/test_header_params/test_tutorial004.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 10397dd...f34b9e1. Read the comment docs.

@github-actions
Copy link
Contributor

📝 Docs preview for commit 6264c0d at: https://60621dd1d9d36700acacba00--fastapi.netlify.app

@github-actions
Copy link
Contributor

📝 Docs preview for commit 29c8e57 at: https://60633f575d81a90f6d0b4ef7--fastapi.netlify.app

@github-actions
Copy link
Contributor

📝 Docs preview for commit 2447106 at: https://606340fc6ced6f136b7f432f--fastapi.netlify.app

@github-actions
Copy link
Contributor

📝 Docs preview for commit f34b9e1 at: https://606342b370838e0ea4d4b3e2--fastapi.netlify.app

@astraldawn astraldawn changed the title WIP: Add include_in_schema parameter to headers to allow hiding in OpenAPI spec Add include_in_schema parameter to headers to allow exclusion from OpenAPI spec Mar 30, 2021
@astraldawn astraldawn marked this pull request as ready for review March 30, 2021 15:28
@astraldawn
Copy link
Contributor Author

Closing in favour of #3144

@tiangolo
Copy link
Owner

tiangolo commented Nov 27, 2022

Thanks for coming back and closing the issue 👍

Sorry for the long delay! 🙈 I wanted to personally address each issue/PR and they piled up through time, but now I'm checking each one in order.

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