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 Callback
callback()
Creates an emptyCallback
element.static final Components
Creates an emptyComponents
element.static final Contact
contact()
Creates an emptyContact
element.static final Contact
static final Contact
static final Discriminator
Creates an emptyDiscriminator
element.static final Discriminator
discriminator
(String propertyName) Creates aDiscriminator
element with the specifiedpropertyName
attribute.static final Encoding
encoding()
Creates an emptyEncoding
element.static final Encoding
Creates anEncoding
element with the specifiedcontentType
attribute.static final Example
example()
Creates an emptyExample
element.static final ExternalDocumentation
Creates an emptyExternalDocumentation
element.static final ExternalDocumentation
Creates anExternalDocumentation
element with the specifiedurl
attribute.static final ExternalDocumentation
externalDocumentation
(Object url, String description) static final HeaderInfo
Creates an emptyHeaderInfo
element.static final HeaderInfo
headerInfo
(SchemaInfo schema) Creates anHeaderInfo
element with the specifiedschema
attribute.static final Info
info()
Creates an emptyInfo
element.static final Info
static final Items
items()
Creates an emptyItems
element.static final Items
static final License
license()
Creates an emptyLicense
element.static final License
static final License
static final Link
link()
Creates an emptyLink
element.static final MediaType
Creates an emptyMediaType
element.static final OAuthFlow
Creates an emptyOAuthFlow
element.static final OAuthFlows
Creates an emptyOAuthFlows
element.static final OpenApi
openApi()
Creates an emptyOpenApi
element.static final OpenApi
static final Operation
Creates an emptyOperation
element.static final Parameter
Creates an emptyParameter
element.static final Parameter
static final PathItem
pathItem()
Creates an emptyPathItem
element.static final RequestBodyInfo
Creates an emptyRequestBodyInfo
element.static final Response
response()
Creates an emptyResponse
element.static final Response
Creates aResponse
element with the specifieddescription
attribute.static final SchemaInfo
Creates an emptySchemaInfo
element.static final SchemaInfo
schemaInfo
(String type) Creates anSchemaInfo
element with the specifiedtype
attribute.static final SecurityRequirement
Creates an emptySecurityRequirement
element.static final SecuritySchemeInfo
Creates an emptySecuritySchemeInfo
element.static final SecuritySchemeInfo
securitySchemeInfo
(String type) Creates anSecuritySchemeInfo
element with the specifiedtype
attribute.static final Server
server()
Creates an emptyServer
element.static final Server
static final ServerVariable
Creates an emptyServerVariable
element.static final ServerVariable
serverVariable
(String defaultValue) Creates aServerVariable
element with the specifieddefault
attribute.static final Tag
tag()
Creates an emptyTag
element.static final Tag
static final Xml
xml()
Creates an emptyXml
element.
-
Method Details
-
contact
Creates an emptyContact
element.- Returns:
- The new element.
-
contact
- Parameters:
name
- Thename
attribute.- Returns:
- The new element.
-
contact
-
externalDocumentation
Creates an emptyExternalDocumentation
element.- Returns:
- The new element.
-
externalDocumentation
Creates anExternalDocumentation
element with the specifiedurl
attribute.- Parameters:
url
- Theurl
attribute.
The value can be of any of the following types:URI
,URL
,String
.
Strings must be valid URIs.
URIs defined byUriResolver
can be used for values.- Returns:
- The new element.
-
externalDocumentation
- Parameters:
url
- Theurl
attribute.
The value can be of any of the following types:URI
,URL
,String
.
Strings must be valid URIs.
URIs defined byUriResolver
can be used for values.description
- Thedescription
attribute.- Returns:
- The new element.
-
headerInfo
Creates an emptyHeaderInfo
element.- Returns:
- The new element.
-
headerInfo
Creates anHeaderInfo
element with the specifiedschema
attribute.- Parameters:
schema
- Theschema
attribute.- Returns:
- The new element.
-
info
Creates an emptyInfo
element.- Returns:
- The new element.
-
info
-
items
Creates an emptyItems
element.- Returns:
- The new element.
-
items
- Parameters:
type
- Thetype
attribute.- Returns:
- The new element.
-
license
Creates an emptyLicense
element.- Returns:
- The new element.
-
license
- Parameters:
name
- Thename
attribute.- Returns:
- The new element.
-
license
-
openApi
Creates an emptyOpenApi
element.- Returns:
- The new element.
-
openApi
- Parameters:
info
- Theinfo
attribute.- Returns:
- The new element.
-
schemaInfo
Creates an emptySchemaInfo
element.- Returns:
- The new element.
-
schemaInfo
Creates anSchemaInfo
element with the specifiedtype
attribute.- Parameters:
type
- Thetype
attribute.- Returns:
- The new element.
-
securitySchemeInfo
Creates an emptySecuritySchemeInfo
element.- Returns:
- The new element.
-
securitySchemeInfo
Creates anSecuritySchemeInfo
element with the specifiedtype
attribute.- Parameters:
type
- Thetype
attribute.- Returns:
- The new element.
-
server
Creates an emptyServer
element.- Returns:
- The new element.
-
server
- Parameters:
url
- Theurl
attribute.- Returns:
- The new element.
-
tag
Creates an emptyTag
element.- Returns:
- The new element.
-
tag
- Parameters:
name
- Thename
attribute.- Returns:
- The new element.
-
xml
Creates an emptyXml
element.- Returns:
- The new element.
-
operation
Creates an emptyOperation
element.- Returns:
- The new element.
-
parameter
Creates an emptyParameter
element.- Returns:
- The new element.
-
parameter
-
pathItem
Creates an emptyPathItem
element.- Returns:
- The new element.
-
response
Creates an emptyResponse
element.- Returns:
- The new element.
-
response
Creates aResponse
element with the specifieddescription
attribute.- Parameters:
description
- Thedescription
attribute.- Returns:
- The new element.
-
components
Creates an emptyComponents
element.- Returns:
- The new element.
-
securityRequirement
Creates an emptySecurityRequirement
element.- Returns:
- The new element.
-
requestBodyInfo
Creates an emptyRequestBodyInfo
element.- Returns:
- The new element.
-
example
Creates an emptyExample
element.- Returns:
- The new element.
-
link
Creates an emptyLink
element.- Returns:
- The new element.
-
callback
Creates an emptyCallback
element.- Returns:
- The new element.
-
discriminator
Creates an emptyDiscriminator
element.- Returns:
- The new element.
-
discriminator
Creates aDiscriminator
element with the specifiedpropertyName
attribute.- Parameters:
propertyName
- ThepropertyName
attribute.- Returns:
- The new element.
-
encoding
Creates an emptyEncoding
element.- Returns:
- The new element.
-
encoding
Creates anEncoding
element with the specifiedcontentType
attribute.- Parameters:
contentType
- ThecontentType
attribute.- Returns:
- The new element.
-
mediaType
Creates an emptyMediaType
element.- Returns:
- The new element.
-
oAuthFlow
Creates an emptyOAuthFlow
element.- Returns:
- The new element.
-
oAuthFlows
Creates an emptyOAuthFlows
element.- Returns:
- The new element.
-
serverVariable
Creates an emptyServerVariable
element.- Returns:
- The new element.
-
serverVariable
Creates aServerVariable
element with the specifieddefault
attribute.- Parameters:
defaultValue
- Thedefault
attribute.- Returns:
- The new element.
-