Make raise_on_unexpected_status
a generation option
#1063
linde12
started this conversation in
Feature request
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm using client combined with
raise_on_unexpected_status
so i would like the API functions (sync & asyncio) to returnT
instead ofOptional[T]
I know
raise_on_unexpected_status
is a runtime flag right now, but to me it makes more sense to have it as a build/generation time flag. The workaround is disabling linting or usingcast
everywhere, but it quickly gets tedious and very ugly.See https://github.com/openapi-generators/openapi-python-client/blob/main/openapi_python_client/templates/endpoint_module.py.jinja#L71
Beta Was this translation helpful? Give feedback.
All reactions