com.holonplatform.jaxrs.swagger.v3

## Interface SwaggerV3

-     public interface SwaggerV3

  Entrypoint interface for Swagger/OpenAPI V3 readers and adapters.
  Since:
    5.2.0

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static Class<? extends io.swagger.v3.jaxrs2.ReaderListener>` | `CONTEXT_READER_LISTENER` A `ReaderListener` class to include in the OpenAPI classes to enable a consistent API definition generation when the `PropertyBox` type is used.

  - ### Method Summary

    All Methods Static Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `static io.swagger.v3.oas.integration.api.OpenApiContext` | `adapt(io.swagger.v3.oas.integration.api.OpenApiContext context)` Adapt given `OpenApiReader` to ensure the `CONTEXT_READER_LISTENER` class inclusion in the classes to read, using an adapted `OpenApiReader`.
    `static io.swagger.v3.oas.integration.api.OpenApiReader` | `adapt(io.swagger.v3.oas.integration.api.OpenApiReader reader)` Adapt given `OpenApiReader` to ensure the `CONTEXT_READER_LISTENER` class inclusion in the classes to read.
    `static String` | `asJson(io.swagger.v3.oas.models.OpenAPI api)` Convert given API definition in JSON format.
    `static String` | `asJson(io.swagger.v3.oas.models.OpenAPI api, boolean pretty)` Convert given API definition in JSON format.
    `static String` | `asYaml(io.swagger.v3.oas.models.OpenAPI api)` Convert given API definition in YAML format.
    `static String` | `asYaml(io.swagger.v3.oas.models.OpenAPI api, boolean pretty)` Convert given API definition in YAML format.
    `static ApiReader<io.swagger.v3.oas.models.OpenAPI>` | `reader(io.swagger.v3.oas.integration.api.OpenAPIConfiguration configuration)` Create a new `ApiReader` to create an OpenAPI definition from a set of API resource classes.

- - ### Field Detail

    - #### CONTEXT_READER_LISTENER

          static final Class<? extends io.swagger.v3.jaxrs2.ReaderListener> CONTEXT_READER_LISTENER

      A `ReaderListener` class to include in the OpenAPI classes to enable a consistent API definition generation when the `PropertyBox` type is used.

  - ### Method Detail

    - #### reader

          static ApiReader<io.swagger.v3.oas.models.OpenAPI> reader(io.swagger.v3.oas.integration.api.OpenAPIConfiguration configuration)

      Create a new `ApiReader` to create an OpenAPI definition from a set of API resource classes.
      Parameters:
        `configuration` - The API configuration to use
      Returns:
        The `ApiReader` instance

    - #### asJson

          static String asJson(io.swagger.v3.oas.models.OpenAPI api,
                               boolean pretty)

      Convert given API definition in JSON format.
      Parameters:
        `api` - The API model to serialize
        `pretty` - Whether to pretty format the output
      Returns:
        The API definition as JSON

    - #### asJson

          static String asJson(io.swagger.v3.oas.models.OpenAPI api)

      Convert given API definition in JSON format.
      Parameters:
        `api` - The API model to serialize
      Returns:
        The API definition as JSON

    - #### asYaml

          static String asYaml(io.swagger.v3.oas.models.OpenAPI api,
                               boolean pretty)

      Convert given API definition in YAML format.
      Parameters:
        `api` - The API model to serialize
        `pretty` - Whether to pretty format the output
      Returns:
        The API definition as YAML

    - #### asYaml

          static String asYaml(io.swagger.v3.oas.models.OpenAPI api)

      Convert given API definition in YAML format.
      Parameters:
        `api` - The API model to serialize
      Returns:
        The API definition as YAML

    - #### adapt

          static io.swagger.v3.oas.integration.api.OpenApiReader adapt(io.swagger.v3.oas.integration.api.OpenApiReader reader)

      Adapt given `OpenApiReader` to ensure the `CONTEXT_READER_LISTENER` class inclusion in the classes to read.

      The `CONTEXT_READER_LISTENER` class is required to provide a consistent API definition when the `PropertyBox` type is used.

      Parameters:
        `reader` - The reader to adapt (not null)
      Returns:
        The adapted `OpenApiReader`

    - #### adapt

          static io.swagger.v3.oas.integration.api.OpenApiContext adapt(io.swagger.v3.oas.integration.api.OpenApiContext context)

      Adapt given `OpenApiReader` to ensure the `CONTEXT_READER_LISTENER` class inclusion in the classes to read, using an adapted `OpenApiReader`.
      Parameters:
        `context` - The context to adapt (not null)
      Returns:
        The adapted `OpenApiContext`
      See Also:
        `adapt(OpenApiReader)`

Copyright © 2019 The Holon Platform. All rights reserved.