-
Notifications
You must be signed in to change notification settings - Fork 200
Module Swagger
The Swagger deployment module generates a Swagger UI.
The configuration for the Swagger module is specified by the swagger
child element of the modules
element of the enunciate configuration file.
attribute | description |
---|---|
host |
The "host" attribute specifies the host used for the Swagger UI. |
docsSubdir |
The "docsSubdir" attribute is used to specify the directory name for the Swagger UI in the deployed application. Default: "ui" |
css |
The "css" attribute is used to specify the file to be used as the cascading stylesheet for the HTML. If one isn't supplied, a default will be provided. |
base |
The "base" attribute specifies a gzipped file or a directory to use as the swagger ui base. If none is supplied, a default base will be provided. |
freemarkerProcessingTemplate |
The "freemarkerProcessingTemplate" attribute specifies the file that is the freemarker processing template to use to generate swagger JSON. If none is supplied, a default one will be used. |
The server elements for the Swagger UI. E.g.:
<server url="/api/" description="..."/>
The scheme
elements specify the schemes (e.g. "https", "http") to be used for the Swagger UI.
Facet configuration for the module. See Facets.
Enunciate currently uses a static copy of Swagger UI version 2.2.10.
Sometimes there is a need to provide a custom instance of the Swagger UI, such as to provide custom configuration
of the SwaggerUI
JavaScript object or to set up custom colors. To do so, download your own copy of Swagger UI,
tweak it to your needs, and tell Enunciate to use that directory (or zip file) as the "base" using the base
attribute in the configuration file. For example:
<enunciate>
<modules>
<swagger base="/path/to/my/custom/swagger-ui"/>