Document Settings
Each swagger document can contain a basic set of properties such as the title of the application. This information can be configured using the various public methods found on the DocumentBuilder
class. These methods all return the document instance allowing you to chain as many of the methods as you need. Be sure to finish your configuration before calling the build
method. Once the build
method has been called, the document settings are no longer modifiable.
const
swaggerOptions
=
new
DocumentBuilder
()
.
setTitle
(
'Blog Application'
)
.
setDescription
(
'APIs for the example blog application.'
)
.
setVersion
(
'1.0.0'
)
.
setTermsOfService
(
'http://swagger.io/terms/'
)
.
setContactEmail
(
'[email protected]'
)
.
setLicense
(
'Apache 2.0'
,
'http://www.apache.org/licenses/LICENSE-2.0.html'
)
.
build
();
These methods are used to configure the info
section of the swagger document. The swagger specification...