Class OpenAPIGenerator
java.lang.Object
org.brapi.schematools.core.openapi.generator.OpenAPIGenerator
Generates an OpenAPI Specification from a BrAPI Json Schema.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreates a OpenAPIGenerator using a defaultBrAPISchemaReaderand the defaultOpenAPIGeneratorOptions.OpenAPIGenerator(OpenAPIGeneratorOptions options) Creates a GraphQLGenerator using a defaultBrAPISchemaReaderand the providedOpenAPIGeneratorOptions. -
Method Summary
Modifier and TypeMethodDescriptionGenerates a list ofOpenAPIfrom 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.generate(Path schemaDirectory, Path componentsDirectory, Collection<String> classNames) Generates a list ofOpenAPIfrom 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.generate(Path schemaDirectory, Path componentsDirectory, OpenAPIGeneratorMetadata metadata) Generates a list ofOpenAPIfrom 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.generate(Path schemaDirectory, Path componentsDirectory, OpenAPIGeneratorMetadata metadata, Collection<String> classNames) Generates a list ofOpenAPIfrom 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.
-
Field Details
-
BRAPI_COMMON
- See Also:
-
-
Constructor Details
-
OpenAPIGenerator
public OpenAPIGenerator()Creates a OpenAPIGenerator using a defaultBrAPISchemaReaderand the defaultOpenAPIGeneratorOptions. -
OpenAPIGenerator
Creates a GraphQLGenerator using a defaultBrAPISchemaReaderand the providedOpenAPIGeneratorOptions.- Parameters:
options- The options to be used in the generation.
-
-
Method Details
-
generate
public Response<List<io.swagger.v3.oas.models.OpenAPI>> generate(Path schemaDirectory, Path componentsDirectory) Generates a list ofOpenAPIfrom 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 singleOpenAPIor separateOpenAPIfor each module. SeeOpenAPIGeneratorOptions.isSeparatingByModule().- Parameters:
schemaDirectory- the path to the complete BrAPI SpecificationcomponentsDirectory- the path to the additional OpenAPI components needed to generate the Specification- Returns:
- a list of
OpenAPIgenerated 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 ofOpenAPIfrom 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 singleOpenAPIor separateOpenAPIfor each module. SeeOpenAPIGeneratorOptions.isSeparatingByModule().- Parameters:
schemaDirectory- the path to the complete BrAPI SpecificationcomponentsDirectory- the path to the additional OpenAPI components needed to generate the Specificationmetadata- additional metadata that is used in the generation- Returns:
- a list of
OpenAPIgenerated 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 ofOpenAPIfrom 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 singleOpenAPIor separateOpenAPIfor each module. SeeOpenAPIGeneratorOptions.isSeparatingByModule().- Parameters:
schemaDirectory- the path to the complete BrAPI SpecificationcomponentsDirectory- the path to the additional OpenAPI components needed to generate the SpecificationclassNames- the names of the classes to be generated- Returns:
- a list of
OpenAPIgenerated 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 ofOpenAPIfrom 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 singleOpenAPIor separateOpenAPIfor each module. SeeOpenAPIGeneratorOptions.isSeparatingByModule().- Parameters:
schemaDirectory- the path to the complete BrAPI SpecificationcomponentsDirectory- the path to the additional OpenAPI components needed to generate the Specificationmetadata- additional metadata that is used in the generationclassNames- the names of the classes to be generated- Returns:
- a list of
OpenAPIgenerated from the complete BrAPI Specification
-