get_schema_view() OpenAPI fixed fields #7996
Unanswered
fgiudici95
asked this question in
Ideas & Suggestions
Replies: 2 comments 1 reply
-
You can extend get_schema() and add anything you want: def get_schema(self, request, public):
schema = super().get_schema(request, public)
schema['info'] = {
'version': __version__,
'title': __title__,
'description':
...
return schema |
Beta Was this translation helpful? Give feedback.
0 replies
-
The documented example is here:
https://www.django-rest-framework.org/api-guide/schemas/#get_schemaself-request
…On Fri, May 21, 2021 at 7:55 AM fgiudici95 ***@***.***> wrote:
Hi @n2ygk <https://github.com/n2ygk>
Thank you for your reply!
There aren't references to your method into official documentation. (
https://www.django-rest-framework.org/api-guide/schemas/#generating-a-dynamic-schema-with-schemaview
)
Regards!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#7996 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABBHS57CDK7M7QZ6Y44TD2DTOZC3JANCNFSM45CWNVPA>
.
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
Reading the documentation and analyzing the code I noticed that it is not possible to generate a OpenAPI file using the
get_schema_view()
function a complete Info Object.I think that would be very interesting to just insert the Contact Object and the License Object
What do you think?
Cheers
Fabio
Beta Was this translation helpful? Give feedback.
All reactions