Skip to content

Commit

Permalink
link to relevent issue
Browse files Browse the repository at this point in the history
  • Loading branch information
schew2381 committed Feb 8, 2024
1 parent e23938e commit d3a5b66
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/sentry/apidocs/spectacular_ports.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,10 @@ def resolve_type_hint(hint) -> Any:
# them is None, validating the schema will fail because "nullable: true"
# with "anyOf" raises an error because there is no "type" key on the
# schema. This works around it by including a proxy null object in
# the "anyOf". See https://github.com/OAI/OpenAPI-Specification/issues/1368.
# the "anyOf".
# See:
# - https://github.com/tfranzel/drf-spectacular/issues/925
# - https://github.com/OAI/OpenAPI-Specification/issues/1368.
if len(args) > 2:
schema["oneOf"].append({"type": "object", "nullable": True})
else:
Expand Down

0 comments on commit d3a5b66

Please sign in to comment.