Package io.swagger.annotations
Annotation Type SwaggerDefinition
-
@Target(TYPE) @Retention(RUNTIME) @Inherited public @interface SwaggerDefinition
Annotation that configures definition level metadata. Still missing are the following: - Security Requirements - Parameters - Responses- Since:
- 1.5.0
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description String
basePath
The basePath to specify in the generated Swagger definition.String[]
consumes
Global level consumes for this swagger definition.ExternalDocs
externalDocs
Reference to external documentation for this Swagger definition.String
host
The host to specify in the generated Swagger definition.Info
info
General metadata for this Swagger definition.String[]
produces
Global level produces for this swagger definition.SwaggerDefinition.Scheme[]
schemes
The transfer protocol of the API.SecurityDefinition
securityDefinition
Defintions for security schemesTag[]
tags
Global tags that can be used to tag individual Apis and ApiOperations.
-
-
-
Element Detail
-
host
String host
The host to specify in the generated Swagger definition.- Returns:
- the host to specify in the generated Swagger definition - keep empty for default
- Default:
- ""
-
-
-
basePath
String basePath
The basePath to specify in the generated Swagger definition.- Returns:
- the basePath to specify in the generated Swagger definition - keep empty for default
- Default:
- ""
-
-
-
consumes
String[] consumes
Global level consumes for this swagger definition.These will be added to all api definitions that don't have local overrides - see https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#swagger-object
- Returns:
- a list of global level consumes.
- Default:
- {""}
-
-
-
produces
String[] produces
Global level produces for this swagger definition.These will be added to all api definitions that don't have local overrides - see https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#swagger-object
- Returns:
- a list of global level consumes
- Default:
- {""}
-
-
-
schemes
SwaggerDefinition.Scheme[] schemes
The transfer protocol of the API.Setting this to Scheme.DEFAULT will result in the result being generated from the hosting container.
- Returns:
- list of supported transfer protocols, keep empty for default
- Default:
- {io.swagger.annotations.SwaggerDefinition.Scheme.DEFAULT}
-
-
-
tags
Tag[] tags
Global tags that can be used to tag individual Apis and ApiOperations.See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#tagObject
- Returns:
- list of globally defined tags
- Default:
- {@io.swagger.annotations.Tag(name="")}
-
-
-
securityDefinition
SecurityDefinition securityDefinition
Defintions for security schemes- Returns:
- defintions for security schemes
- Default:
- @io.swagger.annotations.SecurityDefinition
-
-
-
info
Info info
General metadata for this Swagger definition.See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#infoObject
- Returns:
- general metadata for this Swagger definition
- Default:
- @io.swagger.annotations.Info(title="", version="")
-
-
-
externalDocs
ExternalDocs externalDocs
Reference to external documentation for this Swagger definition.- Returns:
- a reference to external documentation
- Default:
- @io.swagger.annotations.ExternalDocs(url="")
-
-