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
As you can see the 'null' and required: true do bite eachother. And because of this scheme, the swagger-ui cannot be used for this endpoint and gives Required field is not provided.
To Reproduce
Add a ModelField like about.
Add a ModelSerializer with that field as lookup_field.
Expected behavior
The null type can be omitted.
I tried to explicitly add a public_access_uuid = serializers.UUIDField, with different options (required=True, allow_null=False), but that did not help.
This seems to have to do with using OpenAPI 3.1.0. If I load our schema in the OpenAPI editor it also shows an error on those lines, while the OpenAPI next-editor does not stumble over these lines.
Describe the bug
A model with a public_access_uuid (UUIDField(blank=True,null=True)) is used as a path paramater, let's say:
This results in a scheme:
As you can see the 'null' and required: true do bite eachother. And because of this scheme, the swagger-ui cannot be used for this endpoint and gives
Required field is not provided
.To Reproduce
Add a ModelField like about.
Add a ModelSerializer with that field as lookup_field.
Expected behavior
The null type can be omitted.
I tried to explicitly add a public_access_uuid = serializers.UUIDField, with different options (required=True, allow_null=False), but that did not help.
I have now overridden it with:
And that works, but it would be nice to have it work out of the box.
The text was updated successfully, but these errors were encountered: