com.holonplatform.jaxrs.swagger.v2

## Interface SwaggerV2

-     public interface SwaggerV2

  Entrypoint interface for Swagger V2 readers and adapters.
  Since:
    5.2.0

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static Class<? extends io.swagger.jaxrs.config.ReaderListener>` | `CONTEXT_READER_LISTENER` A `ReaderListener` class to include in the API 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 String` | `asJson(io.swagger.models.Swagger api)` Convert given API definition in JSON format.
    `static String` | `asJson(io.swagger.models.Swagger api, boolean pretty)` Convert given API definition in JSON format.
    `static String` | `asYaml(io.swagger.models.Swagger api)` Convert given API definition in YAML format.
    `static String` | `asYaml(io.swagger.models.Swagger api, boolean pretty)` Convert given API definition in YAML format.
    `static ApiReader<io.swagger.models.Swagger>` | `reader(io.swagger.config.SwaggerConfig configuration)` Create a new `ApiReader` to create an `Swagger` definition from a set of API resource classes.
    `static ApiReader<io.swagger.models.Swagger>` | `reader(io.swagger.config.SwaggerConfig configuration, boolean includeAll)` Create a new `ApiReader` to create an `Swagger` definition from a set of API resource classes.

- - ### Field Detail

    - #### CONTEXT_READER_LISTENER

          static final Class<? extends io.swagger.jaxrs.config.ReaderListener> CONTEXT_READER_LISTENER

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

  - ### Method Detail

    - #### reader

          static ApiReader<io.swagger.models.Swagger> reader(io.swagger.config.SwaggerConfig configuration)

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

    - #### reader

          static ApiReader<io.swagger.models.Swagger> reader(io.swagger.config.SwaggerConfig configuration,
                                                             boolean includeAll)

      Create a new `ApiReader` to create an `Swagger` definition from a set of API resource classes.
      Parameters:
        `configuration` - The configuration to use
        `includeAll` - Whether to include all API resource classes. If `false`, only the `Api` annotated classes will be included in the API definitions.
      Returns:
        The `ApiReader` instance

    - #### asJson

          static String asJson(io.swagger.models.Swagger 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.models.Swagger 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.models.Swagger 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.models.Swagger api)

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

Copyright © 2019 The Holon Platform. All rights reserved.