@CompileStatic class OpenApiSettings extends java.lang.Object
How the OpenAPI document is generated, read from the grails.openapi configuration.
The same settings drive a document generated at build time and one springdoc serves. Where
springdoc is present, its springdoc.paths-to-match, springdoc.paths-to-exclude,
springdoc.packages-to-scan and springdoc.packages-to-exclude are honored for the
default document as well, as are springdoc.produces-to-match,
springdoc.consumes-to-match and springdoc.headers-to-match, and
springdoc.api-docs.version chooses the OpenAPI version.
| Type | Name and description |
|---|---|
static java.lang.String |
PREFIXThe prefix of the settings. |
boolean |
annotatedOnlyWhether only an action that declares @Operation, or whose controller declares
@Tag, is described. |
java.lang.String |
baseDocumentA resource location, such as classpath:openapi-base.yml, of a YAML or JSON
document whose information, servers, security, tags, extensions, paths and components the
generated document starts from. |
OpenApiSelection |
defaultSelectionWhat the default document selects. |
boolean |
enabledWhether the document is generated at all. |
java.util.List<OpenApiSelection> |
groupsThe groups, each a document of its own. |
boolean |
includeFormActionsWhether the create and edit actions of a RestfulController are
described. |
boolean |
includeVersionWhether Grails renders the version of a domain class, which it does where grails.converters.json.domain.include.version or
grails.converters.domain.include.version is set. |
java.lang.String |
outputDirectoryWhere the generate-open-api command writes the documents, relative to the
directory it runs in. |
java.lang.String |
outputFormatThe format the generate-open-api command writes: yaml or json. |
io.swagger.v3.oas.models.SpecVersion |
specVersionThe OpenAPI version described. |
| Constructor and description |
|---|
OpenApiSettings() |
| Type Params | Return Type | Name and description |
|---|---|---|
|
static OpenApiSettings |
from(Environment environment)Reads the settings from an environment. |
|
OpenApiSelection |
group(java.lang.String name)
|
| 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) |
The prefix of the settings.
Whether only an action that declares @Operation, or whose controller declares
@Tag, is described. Without it every reachable action is.
A resource location, such as classpath:openapi-base.yml, of a YAML or JSON
document whose information, servers, security, tags, extensions, paths and components the
generated document starts from.
What the default document selects.
Whether the document is generated at all.
The groups, each a document of its own.
Whether the create and edit actions of a RestfulController are
described. They answer the forms an HTML client renders rather than an API client.
Whether Grails renders the version of a domain class, which it does where
grails.converters.json.domain.include.version or
grails.converters.domain.include.version is set.
Where the generate-open-api command writes the documents, relative to the
directory it runs in.
The format the generate-open-api command writes: yaml or json.
The OpenAPI version described.
Reads the settings from an environment.
The properties are read one by one rather than bound, because the configuration Grails
loads from application.yml exposes each nested block as a value of its own, which a
binder would try to convert into the bound type.
null if none is configured