-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
12278 add ipaddressfield serializer for OpenAPI spectacular typing #12285
Conversation
…alidation error if incorrect format
@jeremystretch this should be ready, moved IPAddressField serializer to separate file. I didn't find an auto field mapper for DRF, the closet I found was this discussion (encode/django-rest-framework#3244) but doesn't look like something we would want to do (monkey patching ModelSerializer) as "No, the recommended way is to just specify the field on the serializer class - not a big deal." |
Ack. I must have been thinking about something else; probably django-filters. Apologies for the wild goose chase! |
Fixes: #12278
Creates a serializer for the IPAddressField so typing works correctly for OpenAPI eliminating warnings over the type (the default schema overrides weren't working for this). It's defined in nestedserializers due to scoping (serializers include nestedserializers).