We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I'm running Django with drf_spectacular
I have a serializer that looks something like this (greatly simplified)
class MySerializer(serializers.Serializer): parameters = Parameters(many=True, default=[]) class Parameters(BaseSerializer): param_name = serializers.CharField(required=True, allow_blank=False) param_count = serializers.IntegerField(required=True)
The drf_spectacular annotations are
@extend_schema( request=None, responses={ 200: MySerializer, 400: ErrorResponseSerializer, 500: ErrorResponseSerializer }, description="Load all data" )
The swagger that is being generated for the parameters field is
parameters
"parameters": [],
How can I get it to generate the contents of the list with a sample parameter object. Why isn't drf_spectacular picking it up from the serializers?
parameter
For example, I would expect something like this
"parameters": [ { "string", "int" } ]
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I'm running Django with drf_spectacular
I have a serializer that looks something like this (greatly simplified)
The drf_spectacular annotations are
The swagger that is being generated for the
parameters
field isHow can I get it to generate the contents of the list with a sample
parameter
object. Why isn't drf_spectacular picking it up from the serializers?For example, I would expect something like this
The text was updated successfully, but these errors were encountered: