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

fix: "name" and "in" should not be included in openapi headers #3417

Merged
merged 1 commit into from
Apr 23, 2024

Conversation

peterschutt
Copy link
Contributor

Exclude the "name" and "in" fields from openapi schema generated for headers.

Add BaseSchemaObject._iter_fields() method that allows schema types to define the fields that should be included in their openapi schema representation and override that method for OpenAPIHeader.

Closes #3416

Description

Closes

Copy link

codecov bot commented Apr 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.28%. Comparing base (a31d1c6) to head (ee4194a).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3417   +/-   ##
=======================================
  Coverage   98.28%   98.28%           
=======================================
  Files         324      324           
  Lines       14774    14780    +6     
  Branches     2344     2346    +2     
=======================================
+ Hits        14520    14526    +6     
  Misses        116      116           
  Partials      138      138           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Exclude the "name" and "in" fields from openapi schema generated for headers.

Add ``BaseSchemaObject._iter_fields()``  method that allows schema types to define the fields that should be included in their openapi schema representation and override that method for ``OpenAPIHeader``.

Closes #3416
@peterschutt peterschutt force-pushed the 3416-openapi-excluded-header-fields branch from 68cbe86 to ee4194a Compare April 23, 2024 03:45
Copy link

sonarcloud bot commented Apr 23, 2024

Copy link

Documentation preview will be available shortly at https://litestar-org.github.io/litestar-docs-preview/3417

@peterschutt peterschutt merged commit c372633 into main Apr 23, 2024
28 checks passed
@peterschutt peterschutt deleted the 3416-openapi-excluded-header-fields branch April 23, 2024 03:57
peterschutt added a commit that referenced this pull request May 1, 2024
Exclude the "name" and "in" fields from openapi schema generated for headers.

Add ``BaseSchemaObject._iter_fields()``  method that allows schema types to define the fields that should be included in their openapi schema representation and override that method for ``OpenAPIHeader``.

Closes #3416

(cherry picked from commit c372633)
peterschutt added a commit that referenced this pull request May 2, 2024
Exclude the "name" and "in" fields from openapi schema generated for headers.

Add ``BaseSchemaObject._iter_fields()``  method that allows schema types to define the fields that should be included in their openapi schema representation and override that method for ``OpenAPIHeader``.

Closes #3416

(cherry picked from commit c372633)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: ResponseHeaders results in invalid OpenAPI schema
2 participants