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 SummaryModifier 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- 
contactCreates an emptyContactelement.- Returns:
- The new element.
 
- 
contact- Parameters:
- name- The- nameattribute.
- Returns:
- The new element.
 
- 
contact
- 
externalDocumentationCreates an emptyExternalDocumentationelement.- Returns:
- The new element.
 
- 
externalDocumentationCreates anExternalDocumentationelement with the specifiedurlattribute.- Parameters:
- url- The- urlattribute.
 The value can be of any of the following types:- URI,- URL,- String.
 Strings must be valid URIs.
 URIs defined by- UriResolvercan be used for values.
- Returns:
- The new element.
 
- 
externalDocumentation- Parameters:
- url- The- urlattribute.
 The value can be of any of the following types:- URI,- URL,- String.
 Strings must be valid URIs.
 URIs defined by- UriResolvercan be used for values.
- description- The- descriptionattribute.
- Returns:
- The new element.
 
- 
headerInfoCreates an emptyHeaderInfoelement.- Returns:
- The new element.
 
- 
headerInfoCreates anHeaderInfoelement with the specifiedtypeattribute.- Parameters:
- type- The- typeattribute.
- Returns:
- The new element.
 
- 
headerInfoStrictCreates anHeaderInfoelement with the specifiedtypeattribute.Throws a runtime exception if the type is not valid. - Parameters:
- type- The- typeattribute.
 Valid values:- "string" 
- "number" 
- "integer" 
- "boolean" 
- "array" 
 
- Returns:
- The new element.
 
- 
infoCreates an emptyInfoelement.- Returns:
- The new element.
 
- 
info
- 
itemsCreates an emptyItemselement.- Returns:
- The new element.
 
- 
items- Parameters:
- type- The- typeattribute.
- Returns:
- The new element.
 
- 
itemsStrictCreates anItemselement with the specifiedtypeattribute.Throws a runtime exception if the type is not valid. - Parameters:
- type- The- typeattribute.
 Valid values:- "string" 
- "number" 
- "integer" 
- "boolean" 
- "array" 
 
- Returns:
- The new element.
 
- 
licenseCreates an emptyLicenseelement.- Returns:
- The new element.
 
- 
license- Parameters:
- name- The- nameattribute.
- Returns:
- The new element.
 
- 
license
- 
operationCreates an emptyOperationelement.- Returns:
- The new element.
 
- 
operationMapCreates an emptyOperationMapelement.- Returns:
- The new element.
 
- 
parameterInfoCreates an emptyParameterInfoelement.- Returns:
- The new element.
 
- 
parameterInfo
- 
parameterInfoStrictCreates anParameterInfoelement with the specifiedinandnameattributes.Throws a runtime exception if the type is not valid. 
- 
responseInfoCreates an emptyResponseInfoelement.- Returns:
- The new element.
 
- 
responseInfoCreates anResponseInfoelement with the specifieddescriptionattribute.- Parameters:
- description- The- descriptionattribute.
- Returns:
- The new element.
 
- 
schemaInfoCreates an emptySchemaInfoelement.- Returns:
- The new element.
 
- 
securitySchemeCreates an emptySecuritySchemeelement.- Returns:
- The new element.
 
- 
securitySchemeCreates anSecuritySchemeelement with the specifiedtypeattribute.- Parameters:
- type- The- typeattribute.
- Returns:
- The new element.
 
- 
securitySchemeStrictCreates anSecuritySchemeelement with the specifiedtypeattribute.Throws a runtime exception if the type is not valid. - Parameters:
- type- The- typeattribute.
 Valid values:- "basic" 
- "apiKey" 
- "oauth2" 
 
- Returns:
- The new element.
 
- 
swaggerCreates an emptySwaggerelement.- Returns:
- The new element.
 
- 
swagger- Parameters:
- info- The- infoattribute.
- Returns:
- The new element.
 
- 
tagCreates an emptyTagelement.- Returns:
- The new element.
 
- 
tag- Parameters:
- name- The- nameattribute.
- Returns:
- The new element.
 
- 
xmlCreates an emptyXmlelement.- Returns:
- The new element.
 
 
-