# Package org.eclipse.microprofile.openapi.models

@Version("2.0") @ProviderType package org.eclipse.microprofile.openapi.models
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")))
      }

Related Packages
Package
Description
org.eclipse.microprofile.openapi
A set of Java interfaces, annotations and programming models which allow Java developers to natively produce OpenAPI v3 documents from their JAX-RS applications.
org.eclipse.microprofile.openapi.models.callbacks
An interface to represent callback URL.
org.eclipse.microprofile.openapi.models.examples
An interface to represent a programmable model of an example of a data type or a media type.
org.eclipse.microprofile.openapi.models.headers
An interface of a programmable model to represent a single header object.
org.eclipse.microprofile.openapi.models.info
A set of interfaces of programmable models to represent metadata about the API, including license information and contact information of the exposed API.
org.eclipse.microprofile.openapi.models.links
An interface of a model to represent a design-time link for a response.
org.eclipse.microprofile.openapi.models.media
A set of interfaces for programmable models to represent input and output data types and media types.
org.eclipse.microprofile.openapi.models.parameters
A set of model interfaces to describe operation parameters and operation's request body.
org.eclipse.microprofile.openapi.models.responses
Model interfaces to describe a single response from an API operation, and an annotation to encapsulate multiple responses from an API operation.
org.eclipse.microprofile.openapi.models.security
A set of model interfaces to represent various security components of an OpenAPI app.
org.eclipse.microprofile.openapi.models.servers
Model interfaces to represent servers used for a single API operation or for all operations in an OpenAPI document, as well as a way to represent variables for server URL template substitution.
org.eclipse.microprofile.openapi.models.tags
Model interface to represent a tag of an API endpoint.
Class
Description
Components
Components
Constructible
Marker interface for OpenAPI model objects that can be constructed by the OASFactory.
Extensible<T extends Extensible<T>>
The base interface for OpenAPI model objects that can contain extensions.
ExternalDocumentation
ExternalDocumentation
OpenAPI
OpenAPI
Operation
Operation
PathItem
PathItem
PathItem.HttpMethod
All of the possible types of HTTP operations for this path
Paths
Paths
Reference<T extends Reference<T>>
Base interface for OpenAPI model objects that can make reference to other objects.