Choice field is not serialized as string #12151
Labels
beta
Concerns a bug/feature in a beta release
status: accepted
This issue has been accepted for implementation
type: bug
A confirmed report of unexpected behavior in the application
NetBox version
v3.5-beta
Python version
3.10
Steps to Reproduce
Create Aggregate. Go to API and List Aggregates
Expected Behavior
The family field is a string as specified in openapi spec. Or openapi-spec is changed to specify this field as an object in the response.
Observed Behavior
The family field actually is an object:
This violates the definition.
Removing
@extend_schema_field(OpenApiTypes.STR)
from class ChoiceField produces in this case a more correct API definition:instead of
The text was updated successfully, but these errors were encountered: