Top Description Interfaces
module org.eclipse.microprofile.openapi

Package org.eclipse.microprofile.openapi.models

Annotations
@Version:2.1
@ProviderType

A set of interfaces for programmable models and their helper classes, many derived from Swagger Core library. These interfaces can be used to define OpenAPI document programmatically.

The behaviour of methods inherited from java.lang.Object are undefined by the MicroProfile OpenAPI specification.

Example:

public class MyOASModelReaderImpl implements OASModelReader {

 @Override
 public OpenAPI buildModel() {
     return OASFactory.createObject(OpenAPI.class)
             .info(OASFactory.createObject(Info.class)
                 .title("AirlinesRatingApp API")
                 .version("1.0")
                 .termsOfService("http://airlinesratingapp.com/terms")
                 .contact(OASFactory.createObject(Contact.class)
                     .name("AirlinesRatingApp API Support")
                     .url("http://exampleurl.com/contact")
                     .email("techsupport@airlinesratingapp.com"))
                 .license(OASFactory.createObject(License.class)
                     .name("Apache 2.0")
                     .url("http://www.apache.org/licenses/LICENSE-2.0.html")))
 }

Interface Summary

Modifier and TypeInterface and Description
public interface
Components

Components

Holds a set of reusable objects for different aspects of the API specification.

public interface
Constructible

Marker interface for OpenAPI model objects that can be constructed by the OASFactory.

public interface
Extensible<T extends Extensible<T>>

The base interface for OpenAPI model objects that can contain extensions.

public interface
ExternalDocumentation

ExternalDocumentation

Allows referencing an external resource for extended documentation.

public interface
OpenAPI

OpenAPI

This is the root document object of the OpenAPI document.

public interface
Operation

Operation

Describes a single API operation on a path.

public interface
PathItem

PathItem

Describes the operations available on a single path.

public interface
Paths

Paths

Holds the relative paths to the individual endpoints and their operations.

public interface
Reference<T extends Reference<T>>

Base interface for OpenAPI model objects that can make reference to other objects.