You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using a lookup_field for an integer on a model, together with a lookup_value_regex for runtime validation of the type, I expect the Open API type to be an integer.
The lookup_value_regex is used for validation, DRF will return 404 before entering the domain code if the lookup value does not match the regex.
However, when the Open API type is changed to a pattern string, information on the actual type is lost as it is no longer an integer.
Describe the bug
When using a
lookup_field
for an integer on a model, together with alookup_value_regex
for runtime validation of the type, I expect the Open API type to be an integer.The
lookup_value_regex
is used for validation, DRF will return 404 before entering the domain code if the lookup value does not match the regex.However, when the Open API type is changed to a pattern string, information on the actual type is lost as it is no longer an integer.
To Reproduce
A regression test
Expected behavior
A clear and concise description of what you expected to happen.
I expect the following yaml to be generated.
The text was updated successfully, but these errors were encountered: