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
Hi!
Pls, change this:
drf-spectacular/drf_spectacular/contrib/serializers.py
Line 19 in b73adbb
to:
serializer_model_mapping = {value: key for key, value in serializer.model_serializer_mapping.items()} return { 'oneOf': [c.ref for c in sub_components], 'discriminator': { 'propertyName': serializer.resource_type_field_name, 'mapping': { serializer.to_resource_type(serializer_model_mapping[sub_components[0].object]): c.ref['$ref'] for c in subcomponents }, } }
The text was updated successfully, but these errors were encountered:
ac9d596
Hi, i think that should address your problem. your snipped had the right idea but was incomplete.
please reopen if that does not solve your problem. cheers.
Sorry, something went wrong.
Thanks!
No branches or pull requests
Hi!
Pls, change this:
drf-spectacular/drf_spectacular/contrib/serializers.py
Line 19 in b73adbb
to:
The text was updated successfully, but these errors were encountered: