-
-
Notifications
You must be signed in to change notification settings - Fork 523
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
Add Info to OpenAPI and GroupedOpenAPI properties #2318
Comments
There are no plans to add these new properties. But feel free to propose a PR if you feel it's useful for the community. You can use @Bean
public GroupedOpenApi tweetsOpenApi(@Value("${springdoc.version}") String appVersion) {
String[] paths = { "/tweets/**" };
return GroupedOpenApi.builder().
group("tweets")
.addOpenApiCustomizer(openApi -> openApi.info(new Info().title("Tweets API").version(appVersion)))
.pathsToMatch(paths)
.build();
} |
Hi @bnasslahsen, thanks for the answer. |
As explained, only the programmatic way is now possible ... |
Is your feature request related to a problem? Please describe.
When declaring groups with properties it's not possible to add info customizations dynamically, for each group.
Programmatically I can add info (Title, Description) to openAPIs, but when I want to generate groups dynamically I can't customize (adding Info) each grouped openAPI identifying it by group.
Describe the solution you'd like
springdoc.info
andspringdoc.group-configs[].info
where info will be mapped toio.swagger.v3.oas.models.info.Info
or at leasttitle
,description
,version
fields. ie:springdoc.info.title
springdoc.info.description
springdoc.info.version
Describe alternatives you've considered
OpenApiGroupedCustomizer
. This way we can add info dynamically for each group.The alternative could be added even in parallel with the main solution, as it could be useful for other purposes as well.
The text was updated successfully, but these errors were encountered: