Skip to content

Commit

Permalink
add reference
Browse files Browse the repository at this point in the history
  • Loading branch information
provinzkraut committed Dec 22, 2024
1 parent 2a25bc7 commit 23e0c71
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions litestar/openapi/spec/parameter.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ class Parameter(BaseSchemaObject):
def _exclude_fields(self) -> set[str]:
exclude = set()
if self.param_in != "query":
# these are only allowed in query params
exclude.update({"allow_empty_value", "allow_reserved"})

return exclude
1 change: 1 addition & 0 deletions tests/unit/test_openapi/test_parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,7 @@ async def handler(


def test_query_param_only_properties() -> None:
# https://github.com/litestar-org/litestar/issues/3908
@get("/{path_param:str}")
def handler(
path_param: str,
Expand Down

0 comments on commit 23e0c71

Please sign in to comment.