Top Description Methods
org.eclipse.microprofile.openapi.models

public Interface Extensible<T extends Extensible<T>>

Known Direct Subinterfaces
org.eclipse.microprofile.openapi.models.ExternalDocumentation, org.eclipse.microprofile.openapi.models.OpenAPI, org.eclipse.microprofile.openapi.models.Operation, org.eclipse.microprofile.openapi.models.PathItem, org.eclipse.microprofile.openapi.models.Paths, org.eclipse.microprofile.openapi.models.callbacks.Callback, org.eclipse.microprofile.openapi.models.examples.Example, org.eclipse.microprofile.openapi.models.headers.Header, org.eclipse.microprofile.openapi.models.info.Contact, org.eclipse.microprofile.openapi.models.info.Info, org.eclipse.microprofile.openapi.models.info.License, org.eclipse.microprofile.openapi.models.links.Link, org.eclipse.microprofile.openapi.models.media.Encoding, org.eclipse.microprofile.openapi.models.media.MediaType, org.eclipse.microprofile.openapi.models.media.Schema, org.eclipse.microprofile.openapi.models.media.XML, org.eclipse.microprofile.openapi.models.parameters.Parameter, org.eclipse.microprofile.openapi.models.parameters.RequestBody, org.eclipse.microprofile.openapi.models.responses.APIResponse, org.eclipse.microprofile.openapi.models.responses.APIResponses, org.eclipse.microprofile.openapi.models.security.OAuthFlow, org.eclipse.microprofile.openapi.models.security.OAuthFlows, org.eclipse.microprofile.openapi.models.security.SecurityScheme, org.eclipse.microprofile.openapi.models.servers.Server, org.eclipse.microprofile.openapi.models.servers.ServerVariable, org.eclipse.microprofile.openapi.models.tags.Tag, org.eclipse.microprofile.openapi.models.Components
Imports
java.util.Map

The base interface for OpenAPI model objects that can contain extensions. Extensions contain data not required by the specification and may or may not be supported by the tools you use.

The extensions property names are always prefixed by "x-".

Method Summary

Modifier and TypeMethod and Description
public T

Returns:

the current instance
addExtension
(String
the key used to access the extension object. Always prefixed by "x-".
name
,
Object
data not required by the specification. null values will be rejected (implementation will throw an exception) or ignored.
value
)

Adds the given object to this Extensible's map of extensions, with the given name as its key.

public default T

Returns:

the current instance
extensions
(Map<String, Object>
map containing keys which start with "x-" and values which provide additional information
extensions
)

Sets this Extensible's extensions property to the given map of extensions.

public Map<String, Object>

Returns:

a map containing keys which start with "x-" and values which provide additional information
getExtensions
()

Returns the extensions property from an Extensible instance.

public void
removeExtension(String
the key used to access the extension object. Always prefixed by "x-".
name
)

Removes the given object to this Extensible's map of extensions, with the given name as its key.

public void
setExtensions(Map<String, Object>
map containing keys which start with "x-" and values which provide additional information
extensions
)

Sets this Extensible's extensions property to the given map of extensions.

Method Detail

addExtensionback to summary
public T addExtension(String name, Object value)

Adds the given object to this Extensible's map of extensions, with the given name as its key.

Parameters
name:String

the key used to access the extension object. Always prefixed by "x-".

value:Object

data not required by the specification. null values will be rejected (implementation will throw an exception) or ignored.

Returns:T

the current instance

extensionsback to summary
public default T extensions(Map<String, Object> extensions)

Sets this Extensible's extensions property to the given map of extensions.

Parameters
extensions:Map<String, Object>

map containing keys which start with "x-" and values which provide additional information

Returns:T

the current instance

getExtensionsback to summary
public Map<String, Object> getExtensions()

Returns the extensions property from an Extensible instance.

Returns:Map<String, Object>

a map containing keys which start with "x-" and values which provide additional information

removeExtensionback to summary
public void removeExtension(String name)

Removes the given object to this Extensible's map of extensions, with the given name as its key.

Parameters
name:String

the key used to access the extension object. Always prefixed by "x-".

setExtensionsback to summary
public void setExtensions(Map<String, Object> extensions)

Sets this Extensible's extensions property to the given map of extensions.

Parameters
extensions:Map<String, Object>

map containing keys which start with "x-" and values which provide additional information