Skip to content

Customizer for all OpenAPI descriptions ("default" and GroupedOpenApi) #1609

Closed
@christophejan

Description

@christophejan

Is your feature request related to a problem? Please describe.

Currently, OpenApiCustomiser & OperationCustomizer beans are take in account only for the "default" OpenAPI description. When GroupedOpenApi are declared to just obtain a subset of the described operations, customizer beans are ignored and so the result is inconsistent.

When GroupedOpenApi are declared programmatically, it's possible to manually retrieve the customizer beans and apply them, but I think this Springdoc could make it easier.

When GroupedOpenApi are declared through spring properties, this is especially uncomfortable as I see no way to apply customizer on them.

I think the main usage for GroupedOpenApi is to build an OpenAPI description on a subset of available operations (i.e. a filtered view), and the current behavior on customizer don't seems to ease such use cases.

Describe the solution you'd like

I would like a way to specify customizers applied to all OpenAPI descriptions ("default" and GroupedOpenApi) (i.e. global).

This can be achieved by many ways :

  1. Either by applying OpenApiCustomiser & OperationCustomizer beans on GroupedOpenApi ; but this could have quite strong impacts on existing applications
  2. Or by introducing GlobalOpenApiCustomiser & GlobalOperationCustomizer interfaces
  3. Or by introducing and using a GroupedOpenApiBuilder bean that can be either overridden by applications (@ConditionalOnMissingBean) or customized by providing bean(s) implementing some interface

Etc...

Additional context

Springdoc 1.6.7 - Kotlin webflux

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions