Annotation Interface ApiDocInfo
Place this annotation on a package or handler type to describe the generated API document itself. Compiler options
such as -Afluxzero.openapi.title=... can still override the same values for annotation-processor output.
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionPath where the generated API reference HTML page is served whenserveApiReference()is enabled.Renderer used for the generated API reference HTML page.Optional renderer script URL.Optional renderer stylesheet URL.Extra OpenAPI components such as shared responses or security schemes.Contact email address.Contact name.Contact URL.API description.String[]Top-level OpenAPI vendor extensions asname=jsonentries, for examplex-code-samples-enabled=true.License name.License URL.Optional logo alt text, rendered asinfo.x-logo.altText.Optional logo URL, rendered as the commoninfo.x-logo.urlvendor extension.Path where the generated OpenAPI document is served whenserveOpenApi()is enabled.OpenAPI document version.String[]Top-level OpenAPI security requirements.booleanIftrue, a small HTML API reference endpoint is served for the generated OpenAPI document.booleanIftrue, the generated OpenAPI document is served as an automatic web endpoint.API servers.Terms of service URL.API title.API version.
-
Element Details
-
openApiVersion
String openApiVersionOpenAPI document version. Defaults to3.0.1; set3.1.0when a consumer requires OpenAPI 3.1.- Default:
""
-
title
-
version
-
description
-
termsOfService
-
contactName
-
contactUrl
-
contactEmail
-
licenseName
-
licenseUrl
-
logoUrl
String logoUrlOptional logo URL, rendered as the commoninfo.x-logo.urlvendor extension.- Default:
""
-
logoAltText
-
servers
-
security
String[] securityTop-level OpenAPI security requirements.Values are rendered as security requirement objects. Use
bearerAuthfor a scheme without scopes, oroauth2=read,writefor scoped schemes. Define the actual schemes throughcomponents()with paths such assecuritySchemes.bearerAuth.- Default:
{}
-
serveOpenApi
boolean serveOpenApiIftrue, the generated OpenAPI document is served as an automatic web endpoint.The endpoint is only registered for handlers in the annotated package or type. Use
openApiPath()to avoid route conflicts with application endpoints.- Default:
false
-
openApiPath
String openApiPathPath where the generated OpenAPI document is served whenserveOpenApi()is enabled.This endpoint is also served when
serveApiReference()is enabled, because the generated HTML reference page needs an OpenAPI document to render.Relative paths are resolved against the
Pathvalue at the same package or handler type where this annotation is placed. Absolute paths start at the application root.- Default:
"openapi.json"
-
serveApiReference
boolean serveApiReferenceIftrue, a small HTML API reference endpoint is served for the generated OpenAPI document.The endpoint uses
apiReferenceRenderer()and references externally hosted or self-hosted renderer assets. The SDK does not bundle Redoc, Scalar, Swagger UI, or other frontend assets.- Default:
false
-
apiReferencePath
String apiReferencePathPath where the generated API reference HTML page is served whenserveApiReference()is enabled.Relative paths are resolved against the
Pathvalue at the same package or handler type where this annotation is placed. Absolute paths start at the application root.- Default:
"docs"
-
apiReferenceRenderer
ApiReferenceRenderer apiReferenceRendererRenderer used for the generated API reference HTML page.- Default:
REDOC
-
apiReferenceScriptUrl
String apiReferenceScriptUrlOptional renderer script URL. Leave empty to use the SDK default forapiReferenceRenderer().Set this to a self-hosted URL when CDN access is not desired.
- Default:
""
-
apiReferenceStylesheetUrl
String apiReferenceStylesheetUrlOptional renderer stylesheet URL. Leave empty to use the SDK default forapiReferenceRenderer()when it has one.This is mainly useful for Swagger UI.
- Default:
""
-
components
ApiDocComponent[] componentsExtra OpenAPI components such as shared responses or security schemes. Component paths are relative to the OpenAPIcomponentsobject, for exampleresponses.error.- Default:
{}
-
extensions
String[] extensionsTop-level OpenAPI vendor extensions asname=jsonentries, for examplex-code-samples-enabled=true. Values are parsed as JSON when possible and otherwise rendered as strings.- Default:
{}
-