Skip to content

Conversation

@l0rn
Copy link

@l0rn l0rn commented Apr 29, 2020

Always wrap response in a component schema, also paginated once, to improve processability of API code generators. Adresses #7299

Description

In djangorestframework's AutoSchema I modified the schema generation to always Provide a wrapping OperationIdResponse schema component. That serves the purpose, that if the schema generator add's more fields to the response, like pagination properties the response doesn't have to inline those fields, but instead always points to a schema component.

That makes the resulting openapi specification more processable by API client generators like openapi-generator.

Inlined responses would lead to fallback type names like InlinedRespose2000 - see #7299

Copy link

@paulodhiambo paulodhiambo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good update

@AndrewGuenther
Copy link

I'd love to see this get landed. @l0rn do you have some time to update this PR to resolve the conflicts? If not, I wouldn't mind doing it. Once that's done, @carltongibson @tomchristie is this a change you'd be interested in? Looks like it was good to go but just fell through the cracks.

@l0rn
Copy link
Author

l0rn commented May 20, 2021

Heyho, If I get the hint that this is gonna bei merged after all i'll gladly resolve conflicts

AndrewGuenther pushed a commit to AndrewGuenther/django-rest-framework that referenced this pull request May 24, 2021
@lovelydinosaur lovelydinosaur modified the milestones: 3.13 Release, 3.14 Jan 10, 2022
@stale
Copy link

stale bot commented Mar 28, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Mar 28, 2022
@auvipy auvipy closed this Dec 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants