Interface OpenApiDocumentSource
- All Known Implementing Classes:
OpenApiSourceBase
Source of generated OpenAPI document metadata.
A source can be qualified with @Service.Named so the OpenAPI feature can select it with
generated.document-sources. Unqualified sources always contribute when they support the document context and cannot be filtered by generated.document-sources.
The final composed OpenAPI document must contain Info metadata. The metadata can be contributed by a custom source,
generated from an application type annotated with @OpenApi.Document and
@OpenApi.Info, or supplied by static OpenAPI content when static and generated content are merged.
An individual source does not need to provide Info metadata if another contribution supplies it.
-
Method Summary
Modifier and TypeMethodDescriptionvoiddescribe(OpenApiDocumentContext context, OpenApiDocument.Builder document) Describe this source as OpenAPI document metadata.default booleansupports(OpenApiDocumentContext context) Whether this source contributes to the provided document context.
-
Method Details
-
supports
Whether this source contributes to the provided document context.- Parameters:
context- document context- Returns:
trueif this source should contribute
-
describe
Describe this source as OpenAPI document metadata.- Parameters:
context- document contextdocument- document builder
-