Package org.apache.juneau.bean.openapi3
Class OpenApiBuilder
java.lang.Object
org.apache.juneau.bean.openapi3.OpenApiBuilder
Various useful static methods for creating OpenAPI elements.
See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic final Callbackcallback()Creates an emptyCallbackelement.static final ComponentsCreates an emptyComponentselement.static final Contactcontact()Creates an emptyContactelement.static final Contactstatic final Contactstatic final DiscriminatorCreates an emptyDiscriminatorelement.static final Discriminatordiscriminator(String propertyName) Creates aDiscriminatorelement with the specifiedpropertyNameattribute.static final Encodingencoding()Creates an emptyEncodingelement.static final EncodingCreates anEncodingelement with the specifiedcontentTypeattribute.static final Exampleexample()Creates an emptyExampleelement.static 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(SchemaInfo schema) Creates anHeaderInfoelement with the specifiedschemaattribute.static final Infoinfo()Creates an emptyInfoelement.static final Infostatic final Itemsitems()Creates an emptyItemselement.static final Itemsstatic final Licenselicense()Creates an emptyLicenseelement.static final Licensestatic final Licensestatic final Linklink()Creates an emptyLinkelement.static final MediaTypeCreates an emptyMediaTypeelement.static final OAuthFlowCreates an emptyOAuthFlowelement.static final OAuthFlowsCreates an emptyOAuthFlowselement.static final OpenApiopenApi()Creates an emptyOpenApielement.static final OpenApistatic final OperationCreates an emptyOperationelement.static final ParameterCreates an emptyParameterelement.static final Parameterstatic final PathItempathItem()Creates an emptyPathItemelement.static final RequestBodyInfoCreates an emptyRequestBodyInfoelement.static final Responseresponse()Creates an emptyResponseelement.static final ResponseCreates aResponseelement with the specifieddescriptionattribute.static final SchemaInfoCreates an emptySchemaInfoelement.static final SchemaInfoschemaInfo(String type) Creates anSchemaInfoelement with the specifiedtypeattribute.static final SecurityRequirementCreates an emptySecurityRequirementelement.static final SecuritySchemeInfoCreates an emptySecuritySchemeInfoelement.static final SecuritySchemeInfosecuritySchemeInfo(String type) Creates anSecuritySchemeInfoelement with the specifiedtypeattribute.static final Serverserver()Creates an emptyServerelement.static final Serverstatic final ServerVariableCreates an emptyServerVariableelement.static final ServerVariableserverVariable(String defaultValue) Creates aServerVariableelement with the specifieddefaultattribute.static final Tagtag()Creates an emptyTagelement.static final Tagstatic final Xmlxml()Creates an emptyXmlelement.
-
Method Details
-
callback
Creates an emptyCallbackelement.- Returns:
- The new element.
-
components
Creates an emptyComponentselement.- Returns:
- The new element.
-
contact
Creates an emptyContactelement.- Returns:
- The new element.
-
contact
- Parameters:
name- Thenameattribute.- Returns:
- The new element.
-
contact
-
discriminator
Creates an emptyDiscriminatorelement.- Returns:
- The new element.
-
discriminator
Creates aDiscriminatorelement with the specifiedpropertyNameattribute.- Parameters:
propertyName- ThepropertyNameattribute.- Returns:
- The new element.
-
encoding
Creates an emptyEncodingelement.- Returns:
- The new element.
-
encoding
Creates anEncodingelement with the specifiedcontentTypeattribute.- Parameters:
contentType- ThecontentTypeattribute.- Returns:
- The new element.
-
example
Creates an emptyExampleelement.- Returns:
- The new element.
-
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 specifiedschemaattribute.- Parameters:
schema- Theschemaattribute.- 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.
-
license
Creates an emptyLicenseelement.- Returns:
- The new element.
-
license
- Parameters:
name- Thenameattribute.- Returns:
- The new element.
-
license
-
link
Creates an emptyLinkelement.- Returns:
- The new element.
-
mediaType
Creates an emptyMediaTypeelement.- Returns:
- The new element.
-
oAuthFlow
Creates an emptyOAuthFlowelement.- Returns:
- The new element.
-
oAuthFlows
Creates an emptyOAuthFlowselement.- Returns:
- The new element.
-
openApi
Creates an emptyOpenApielement.- Returns:
- The new element.
-
openApi
- Parameters:
info- Theinfoattribute.- Returns:
- The new element.
-
operation
Creates an emptyOperationelement.- Returns:
- The new element.
-
parameter
Creates an emptyParameterelement.- Returns:
- The new element.
-
parameter
-
pathItem
Creates an emptyPathItemelement.- Returns:
- The new element.
-
requestBodyInfo
Creates an emptyRequestBodyInfoelement.- Returns:
- The new element.
-
response
Creates an emptyResponseelement.- Returns:
- The new element.
-
response
Creates aResponseelement with the specifieddescriptionattribute.- Parameters:
description- Thedescriptionattribute.- Returns:
- The new element.
-
schemaInfo
Creates an emptySchemaInfoelement.- Returns:
- The new element.
-
schemaInfo
Creates anSchemaInfoelement with the specifiedtypeattribute.- Parameters:
type- Thetypeattribute.- Returns:
- The new element.
-
securityRequirement
Creates an emptySecurityRequirementelement.- Returns:
- The new element.
-
securitySchemeInfo
Creates an emptySecuritySchemeInfoelement.- Returns:
- The new element.
-
securitySchemeInfo
Creates anSecuritySchemeInfoelement with the specifiedtypeattribute.- Parameters:
type- Thetypeattribute.- Returns:
- The new element.
-
server
Creates an emptyServerelement.- Returns:
- The new element.
-
server
- Parameters:
url- Theurlattribute.- Returns:
- The new element.
-
serverVariable
Creates an emptyServerVariableelement.- Returns:
- The new element.
-
serverVariable
Creates aServerVariableelement with the specifieddefaultattribute.- Parameters:
defaultValue- Thedefaultattribute.- 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.
-