Class OpenAPIGenerator

java.lang.Object
org.brapi.schematools.core.openapi.generator.OpenAPIGenerator

public class OpenAPIGenerator extends Object
Generates an OpenAPI Specification from a BrAPI Json Schema.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a OpenAPIGenerator using a default BrAPISchemaReader and the default OpenAPIGeneratorOptions.
    Creates a GraphQLGenerator using a default BrAPISchemaReader and the provided OpenAPIGeneratorOptions.
  • Method Summary

    Modifier and Type
    Method
    Description
    Response<List<io.swagger.v3.oas.models.OpenAPI>>
    generate(Path schemaDirectory, Path componentsDirectory)
    Generates a list of OpenAPI from the complete BrAPI Specification in a directory contains a subdirectories for each module that contain the BrAPI JSON schema and the additional subdirectories called 'Requests' that contains the request schemas and BrAPI-Common that contains common schemas for use across modules.
    Response<List<io.swagger.v3.oas.models.OpenAPI>>
    generate(Path schemaDirectory, Path componentsDirectory, Collection<String> classNames)
    Generates a list of OpenAPI from the complete BrAPI Specification in a directory contains a subdirectories for each module that contain the BrAPI JSON schema and the additional subdirectories called 'Requests' that contains the request schemas and BrAPI-Common that contains common schemas for use across modules.
    Response<List<io.swagger.v3.oas.models.OpenAPI>>
    generate(Path schemaDirectory, Path componentsDirectory, OpenAPIGeneratorMetadata metadata)
    Generates a list of OpenAPI from the complete BrAPI Specification in a directory contains a subdirectories for each module that contain the BrAPI JSON schema and the additional subdirectories called 'Requests' that contains the request schemas and BrAPI-Common that contains common schemas for use across modules.
    Response<List<io.swagger.v3.oas.models.OpenAPI>>
    generate(Path schemaDirectory, Path componentsDirectory, OpenAPIGeneratorMetadata metadata, Collection<String> classNames)
    Generates a list of OpenAPI from the complete BrAPI Specification in a directory contains a subdirectories for each module that contain the BrAPI JSON schema and the additional subdirectories called 'Requests' that contains the request schemas and BrAPI-Common that contains common schemas for use across modules.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

  • Method Details

    • generate

      public Response<List<io.swagger.v3.oas.models.OpenAPI>> generate(Path schemaDirectory, Path componentsDirectory)
      Generates a list of OpenAPI from the complete BrAPI Specification in a directory contains a subdirectories for each module that contain the BrAPI JSON schema and the additional subdirectories called 'Requests' that contains the request schemas and BrAPI-Common that contains common schemas for use across modules. The list will contain a single OpenAPI or separate OpenAPI for each module. See OpenAPIGeneratorOptions.isSeparatingByModule().
      Parameters:
      schemaDirectory - the path to the complete BrAPI Specification
      componentsDirectory - the path to the additional OpenAPI components needed to generate the Specification
      Returns:
      a list of OpenAPI generated from the complete BrAPI Specification
    • generate

      public Response<List<io.swagger.v3.oas.models.OpenAPI>> generate(Path schemaDirectory, Path componentsDirectory, OpenAPIGeneratorMetadata metadata)
      Generates a list of OpenAPI from the complete BrAPI Specification in a directory contains a subdirectories for each module that contain the BrAPI JSON schema and the additional subdirectories called 'Requests' that contains the request schemas and BrAPI-Common that contains common schemas for use across modules. The list will contain a single OpenAPI or separate OpenAPI for each module. See OpenAPIGeneratorOptions.isSeparatingByModule().
      Parameters:
      schemaDirectory - the path to the complete BrAPI Specification
      componentsDirectory - the path to the additional OpenAPI components needed to generate the Specification
      metadata - additional metadata that is used in the generation
      Returns:
      a list of OpenAPI generated from the complete BrAPI Specification
    • generate

      public Response<List<io.swagger.v3.oas.models.OpenAPI>> generate(Path schemaDirectory, Path componentsDirectory, Collection<String> classNames)
      Generates a list of OpenAPI from the complete BrAPI Specification in a directory contains a subdirectories for each module that contain the BrAPI JSON schema and the additional subdirectories called 'Requests' that contains the request schemas and BrAPI-Common that contains common schemas for use across modules. The list will contain a single OpenAPI or separate OpenAPI for each module. See OpenAPIGeneratorOptions.isSeparatingByModule().
      Parameters:
      schemaDirectory - the path to the complete BrAPI Specification
      componentsDirectory - the path to the additional OpenAPI components needed to generate the Specification
      classNames - the names of the classes to be generated
      Returns:
      a list of OpenAPI generated from the complete BrAPI Specification
    • generate

      public Response<List<io.swagger.v3.oas.models.OpenAPI>> generate(Path schemaDirectory, Path componentsDirectory, OpenAPIGeneratorMetadata metadata, Collection<String> classNames)
      Generates a list of OpenAPI from the complete BrAPI Specification in a directory contains a subdirectories for each module that contain the BrAPI JSON schema and the additional subdirectories called 'Requests' that contains the request schemas and BrAPI-Common that contains common schemas for use across modules. The list will contain a single OpenAPI or separate OpenAPI for each module. See OpenAPIGeneratorOptions.isSeparatingByModule().
      Parameters:
      schemaDirectory - the path to the complete BrAPI Specification
      componentsDirectory - the path to the additional OpenAPI components needed to generate the Specification
      metadata - additional metadata that is used in the generation
      classNames - the names of the classes to be generated
      Returns:
      a list of OpenAPI generated from the complete BrAPI Specification