Class ApiTransformer

java.lang.Object
dk.mada.jaxrs.openapi.ApiTransformer

public class ApiTransformer extends Object
Transforms OpenApi operations to local model objects. DefaultGenerator:processOperation
  • Constructor Details

    • ApiTransformer

      public ApiTransformer(Naming naming, Parser.LeakedGeneratorOpts leakedGenOpts, TypeConverter typeConverter, ContentSelector contentSelector, List<SecurityScheme> securitySchemes)
      Constructs a new API transformer instance.
      Parameters:
      naming - the naming instance
      leakedGenOpts - the leaked generator options
      typeConverter - the type converter
      contentSelector - the content selector
      securitySchemes - the security schemes
  • Method Details

    • transform

      public Operations transform(io.swagger.v3.oas.models.OpenAPI specification)
      Transforms OpenApi specification to operations.
      Parameters:
      specification - the OpenApi specification
      Returns:
      Operations in the API
    • selectContent

      public Content selectContent(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 from
      context - the context where the content is looked up from
      Returns:
      the selected (model) content