@CompileStatic class GroupedOpenApiContributor extends java.lang.Object implements BeanPostProcessor, BeanFactoryAware
Contributes the Grails description to every springdoc group.
springdoc gives a group only the customizers the group itself carries and the global ones,
and a global customizer cannot tell which group it is customizing. So each group - one this
module registers for grails.openapi.groups, or one the application declares - is given
its own customizer, selecting what the group's criteria select, before springdoc builds the
group's document.
The Grails description is contributed ahead of every other OpenApiCustomizer, in each
group and in the default document, so one the application declares sees the Grails operations.
springdoc runs its OpenApiLocaleCustomizers before any of them, so those do not.
| Constructor and description |
|---|
GroupedOpenApiContributor() |
| Type Params | Return Type | Name and description |
|---|---|---|
|
static void |
customize(ApplicationContext applicationContext, java.lang.String group, io.swagger.v3.oas.models.OpenAPI openApi)Applies to a document generated without serving it the customizers springdoc applies to the document it serves: the default document's, or a group's own and the global ones. |
|
static java.util.List<OpenApiSelection> |
declaredGroups(ApplicationContext applicationContext)The groups an application declares to springdoc, so the generate-open-api command
writes a document for each of them too. |
|
static OpenApiSelection |
defaultSelection(ApplicationContext applicationContext, OpenApiSelection criteria)The document an application generates without serving it: its default document, with springdoc's method filters applied, where springdoc is configured. |
|
java.lang.Object |
postProcessAfterInitialization(java.lang.Object bean, java.lang.String beanName) |
|
java.lang.Object |
postProcessBeforeInitialization(java.lang.Object bean, java.lang.String beanName) |
|
static OpenApiSelection |
selectionOf(org.springdoc.core.models.GroupedOpenApi group, org.springdoc.core.properties.SpringDocConfigProperties properties)What a group selects, as springdoc selects it: springdoc's own top-level criteria apply to every group, and a group's criterion only where the top-level one is empty. |
|
void |
setBeanFactory(BeanFactory beanFactory) |
| Methods inherited from class | Name |
|---|---|
class java.lang.Object |
java.lang.Object#equals(java.lang.Object), java.lang.Object#getClass(), java.lang.Object#hashCode(), java.lang.Object#notify(), java.lang.Object#notifyAll(), java.lang.Object#toString(), java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int) |
Applies to a document generated without serving it the customizers springdoc applies to the document it serves: the default document's, or a group's own and the global ones. The one contributing the Grails description is left out, since the document already has it. A customizer that cannot customize a document outside a request is skipped, and logged.
group - the group, or null for the default document The groups an application declares to springdoc, so the generate-open-api command
writes a document for each of them too.
The document an application generates without serving it: its default document, with springdoc's method filters applied, where springdoc is configured.
What a group selects, as springdoc selects it: springdoc's own top-level criteria apply to every group, and a group's criterion only where the top-level one is empty.
properties - springdoc's configuration, where springdoc is configured