Package org.apache.juneau.bean.swagger
Class SwaggerBuilder
java.lang.Object
org.apache.juneau.bean.swagger.SwaggerBuilder
Various useful static methods for creating Swagger elements.
See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic final Contactcontact()Creates an emptyContactelement.static final Contactstatic final Contactstatic final ExternalDocumentationCreates an emptyExternalDocumentationelement.static final ExternalDocumentationCreates anExternalDocumentationelement with the specifiedurlattribute.static final ExternalDocumentationexternalDocumentation(Object url, String description) static final HeaderInfoCreates an emptyHeaderInfoelement.static final HeaderInfoheaderInfo(String type) Creates anHeaderInfoelement with the specifiedtypeattribute.static final HeaderInfoheaderInfoStrict(String type) Creates anHeaderInfoelement with the specifiedtypeattribute.static final Infoinfo()Creates an emptyInfoelement.static final Infostatic final Itemsitems()Creates an emptyItemselement.static final Itemsstatic final ItemsitemsStrict(String type) static final Licenselicense()Creates an emptyLicenseelement.static final Licensestatic final Licensestatic final OperationCreates an emptyOperationelement.static final OperationMapCreates an emptyOperationMapelement.static final ParameterInfoCreates an emptyParameterInfoelement.static final ParameterInfoparameterInfo(String in, String name) static final ParameterInfoparameterInfoStrict(String in, String name) static final ResponseInfoCreates an emptyResponseInfoelement.static final ResponseInforesponseInfo(String description) Creates anResponseInfoelement with the specifieddescriptionattribute.static final SchemaInfoCreates an emptySchemaInfoelement.static final SecuritySchemeCreates an emptySecuritySchemeelement.static final SecuritySchemesecurityScheme(String type) Creates anSecuritySchemeelement with the specifiedtypeattribute.static final SecuritySchemesecuritySchemeStrict(String type) Creates anSecuritySchemeelement with the specifiedtypeattribute.static final Swaggerswagger()Creates an emptySwaggerelement.static final Swaggerstatic final Tagtag()Creates an emptyTagelement.static final Tagstatic final Xmlxml()Creates an emptyXmlelement.
-
Method Details
-
contact
Creates an emptyContactelement.- Returns:
- The new element.
-
contact
- Parameters:
name- Thenameattribute.- Returns:
- The new element.
-
contact
-
externalDocumentation
Creates an emptyExternalDocumentationelement.- Returns:
- The new element.
-
externalDocumentation
Creates anExternalDocumentationelement with the specifiedurlattribute.- Parameters:
url- Theurlattribute.
The value can be of any of the following types:URI,URL,String.
Strings must be valid URIs.
URIs defined byUriResolvercan be used for values.- Returns:
- The new element.
-
externalDocumentation
- Parameters:
url- Theurlattribute.
The value can be of any of the following types:URI,URL,String.
Strings must be valid URIs.
URIs defined byUriResolvercan be used for values.description- Thedescriptionattribute.- Returns:
- The new element.
-
headerInfo
Creates an emptyHeaderInfoelement.- Returns:
- The new element.
-
headerInfo
Creates anHeaderInfoelement with the specifiedtypeattribute.- Parameters:
type- Thetypeattribute.- Returns:
- The new element.
-
headerInfoStrict
Creates anHeaderInfoelement with the specifiedtypeattribute.Throws a runtime exception if the type is not valid.
- Parameters:
type- Thetypeattribute.
Valid values:"string" "number" "integer" "boolean" "array"
- Returns:
- The new element.
-
info
Creates an emptyInfoelement.- Returns:
- The new element.
-
info
-
items
Creates an emptyItemselement.- Returns:
- The new element.
-
items
- Parameters:
type- Thetypeattribute.- Returns:
- The new element.
-
itemsStrict
Creates anItemselement with the specifiedtypeattribute.Throws a runtime exception if the type is not valid.
- Parameters:
type- Thetypeattribute.
Valid values:"string" "number" "integer" "boolean" "array"
- Returns:
- The new element.
-
license
Creates an emptyLicenseelement.- Returns:
- The new element.
-
license
- Parameters:
name- Thenameattribute.- Returns:
- The new element.
-
license
-
operation
Creates an emptyOperationelement.- Returns:
- The new element.
-
operationMap
Creates an emptyOperationMapelement.- Returns:
- The new element.
-
parameterInfo
Creates an emptyParameterInfoelement.- Returns:
- The new element.
-
parameterInfo
-
parameterInfoStrict
Creates anParameterInfoelement with the specifiedinandnameattributes.Throws a runtime exception if the type is not valid.
-
responseInfo
Creates an emptyResponseInfoelement.- Returns:
- The new element.
-
responseInfo
Creates anResponseInfoelement with the specifieddescriptionattribute.- Parameters:
description- Thedescriptionattribute.- Returns:
- The new element.
-
schemaInfo
Creates an emptySchemaInfoelement.- Returns:
- The new element.
-
securityScheme
Creates an emptySecuritySchemeelement.- Returns:
- The new element.
-
securityScheme
Creates anSecuritySchemeelement with the specifiedtypeattribute.- Parameters:
type- Thetypeattribute.- Returns:
- The new element.
-
securitySchemeStrict
Creates anSecuritySchemeelement with the specifiedtypeattribute.Throws a runtime exception if the type is not valid.
- Parameters:
type- Thetypeattribute.
Valid values:"basic" "apiKey" "oauth2"
- Returns:
- The new element.
-
swagger
Creates an emptySwaggerelement.- Returns:
- The new element.
-
swagger
- Parameters:
info- Theinfoattribute.- Returns:
- The new element.
-
tag
Creates an emptyTagelement.- Returns:
- The new element.
-
tag
- Parameters:
name- Thenameattribute.- Returns:
- The new element.
-
xml
Creates an emptyXmlelement.- Returns:
- The new element.
-