Skip navigation links

MicroProfile OpenAPI API v2.0

@Version(value="2.0") @ProviderType

Package 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.

See: Description

Package org.eclipse.microprofile.openapi.models.responses Description

Model interfaces to describe a single response from an API operation, and an annotation to encapsulate multiple responses from an API operation.

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

Example usage:

  .GET(OASFactory.createObject(Operation.class)
      .summary("Retrieve all bookings for current user")
      .operationId("getAllBookings")
      .responses(OASFactory.createObject(APIResponses.class)
          .addApiResponse("200", OASFactory.createObject(APIResponse.class)
              .description("Bookings retrieved")
              .content(OASFactory.createObject(Content.class)
                  .addMediaType("applictaion/json", OASFactory.createObject(MediaType.class)
                      .schema(OASFactory.createObject(Schema.class)
                          .type(Schema.SchemaType.ARRAY)
                          .ref("#/components.schemas.Booking")))))
 
Skip navigation links

MicroProfile OpenAPI API v2.0

Copyright © 2017 – 2020 Eclipse Foundation. All rights reserved.
Use is subject to license terms.