Package dk.mada.jaxrs.openapi
Class ApiTransformer
java.lang.Object
dk.mada.jaxrs.openapi.ApiTransformer
Transforms OpenApi operations to local model objects.
DefaultGenerator:processOperation
-
Constructor Summary
ConstructorsConstructorDescriptionApiTransformer(io.swagger.v3.oas.models.OpenAPI specification, Naming naming, Parser.LeakedGeneratorOpts leakedGenOpts, TypeConverter typeConverter, ContentSelector contentSelector, List<SecurityScheme> securitySchemes) Constructs a new API transformer instance. -
Method Summary
Modifier and TypeMethodDescriptionselectContent(@Nullable io.swagger.v3.oas.models.media.Content c, ContentSelector.ContentContext context) Selects desired content implementation from context and configuration.transform(io.swagger.v3.oas.models.OpenAPI specification) Transforms OpenApi specification to operations.
-
Constructor Details
-
ApiTransformer
public ApiTransformer(io.swagger.v3.oas.models.OpenAPI specification, Naming naming, Parser.LeakedGeneratorOpts leakedGenOpts, TypeConverter typeConverter, ContentSelector contentSelector, List<SecurityScheme> securitySchemes) Constructs a new API transformer instance.- Parameters:
specification- the OpenApi specificationnaming- the naming instanceleakedGenOpts- the leaked generator optionstypeConverter- the type convertercontentSelector- the content selectorsecuritySchemes- the security schemes
-
-
Method Details
-
transform
Transforms OpenApi specification to operations.- Parameters:
specification- the OpenApi specification- Returns:
- Operations in the API
-
selectContent
public Content selectContent(@Nullable io.swagger.v3.oas.models.media.Content c, ContentSelector.ContentContext context) Selects desired content implementation from context and configuration. Uses logic partially moved to the model.- Parameters:
c- the OpenApi content to select fromcontext- the context where the content is looked up from- Returns:
- the selected (model) content
-