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

public @Interface OpenAPIDefinition

extends Annotation
Annotations
@Target:TYPE, PACKAGE
@Retention:RUNTIME
@Inherited
Imports
java.lang.annotation.ElementType, .Inherited, .Retention, .RetentionPolicy, .Target, org.eclipse.microprofile.openapi.annotations.extensions.Extension, org.eclipse.microprofile.openapi.annotations.info.Info, org.eclipse.microprofile.openapi.annotations.security.SecurityRequirement, .SecurityRequirementsSet, org.eclipse.microprofile.openapi.annotations.servers.Server, org.eclipse.microprofile.openapi.annotations.tags.Tag

OpenAPI

This is the root document object of the OpenAPI document. It contains required and optional fields.

See Also
OpenAPI Specification OpenAPI Object

Method Summary

Modifier and TypeMethod and Description
public Components

Returns:

the element with a set of reusable objects for different aspects of the OAS.
components
()

An element to hold a set of reusable objects for different aspects of the OpenAPI Specification (OAS).

public Extension[]

Returns:

array of extensions
extensions
()

List of extensions to be added to the OpenAPI model corresponding to the containing annotation.

public ExternalDocumentation

Returns:

the external documentation for this API.
externalDocs
()

Any additional external documentation for the API

public Info

Returns:

the metadata about this API
info
()

Required: Provides metadata about the API.

public SecurityRequirement[]

Returns:

the array of security requirements for this API
security
()

A declaration of which security mechanisms can be used across the API.

public SecurityRequirementsSet[]

Returns:

the array of security requirement sets for this API
securitySets
()

A declaration of which security mechanisms can be used across the API.

public Server[]

Returns:

the servers of this API
servers
()

An array of Server Objects, which provide connectivity information to a target server.

public Tag[]

Returns:

the tags used by the specification with any additional metadata
tags
()

A list of tags used by the specification with additional metadata.

public PathItem[]

Returns:

the array of webhooks
webhooks
()

An array of webhook definitions which the API may be instructed to call using out-of-band mechanisms.

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Method Detail

componentsback to summary
public Components components()

An element to hold a set of reusable objects for different aspects of the OpenAPI Specification (OAS). All objects defined within the components object will have no effect on the API unless they are explicitly referenced from properties outside the components object.

Returns:Components

the element with a set of reusable objects for different aspects of the OAS.

extensionsback to summary
public Extension[] extensions()

List of extensions to be added to the OpenAPI model corresponding to the containing annotation.

Returns:Extension[]

array of extensions

Since
3.1
externalDocsback to summary
public ExternalDocumentation externalDocs()

Any additional external documentation for the API

Returns:ExternalDocumentation

the external documentation for this API.

infoback to summary
public Info info()

Required: Provides metadata about the API. The metadata MAY be used by tooling as required.

Returns:Info

the metadata about this API

securityback to summary
public SecurityRequirement[] security()

A declaration of which security mechanisms can be used across the API.

Adding a SecurityRequirement to this array is equivalent to adding a SecurityRequirementsSet containing a single SecurityRequirement to securitySets().

Returns:SecurityRequirement[]

the array of security requirements for this API

securitySetsback to summary
public SecurityRequirementsSet[] securitySets()

A declaration of which security mechanisms can be used across the API.

All of the security requirements within any one of the sets must be satisfied to authorize a request.

Including an empty set within this list indicates that the other requirements are optional.

Returns:SecurityRequirementsSet[]

the array of security requirement sets for this API

serversback to summary
public Server[] servers()

An array of Server Objects, which provide connectivity information to a target server. If the servers property is not provided, or is an empty array, the default value would be a Server Object with a url value of /.

Returns:Server[]

the servers of this API

tagsback to summary
public Tag[] tags()

A list of tags used by the specification with additional metadata. The order of the tags can be used to reflect on their order by the parsing tools.

Returns:Tag[]

the tags used by the specification with any additional metadata

webhooksback to summary
public PathItem[] webhooks()

An array of webhook definitions which the API may be instructed to call using out-of-band mechanisms.

Returns:PathItem[]

the array of webhooks

Since
4.0