Skip to content
New issue

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

Added ability to set name for ApiResponse and RequestBody annotations #4861

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

altro3
Copy link

@altro3 altro3 commented Mar 13, 2025

It is now possible to specify the name of any component using an annotation, except for RequestBody and ApiResponse. The name of the components is required not only for the linear description of the specification, but also so that these components can be taken out to the #/components/ block.

The idea is to add a new annotation in which the user can describe common components and then refer to these components.

In other words, the RequestBody and ApiResponse annotations currently have a ref field to reference the component, but there is no way to add this component to the #/components/ block

My idea is to add an OpenAPIComponents annotation something like this:

{AE43898C-05D9-4203-ADE6-08EC89BF8E8F}

To allow the code to describe common components, and add annotations with references to common components to methods / fields / parameters

@altro3
Copy link
Author

altro3 commented Mar 13, 2025

@frantuma Look to this, please. If there is anything that needs to be improved, let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant