Class AkkaHttpServerCodegen

All Implemented Interfaces:
io.swagger.codegen.v3.CodegenConfig

public class AkkaHttpServerCodegen extends AbstractScalaCodegen
  • Field Details

    • groupId

      protected String groupId
    • artifactId

      protected String artifactId
    • artifactVersion

      protected String artifactVersion
    • invokerPackage

      protected String invokerPackage
    • LOWERCASE_HTTP_METHOD

      protected static String LOWERCASE_HTTP_METHOD
    • PATHS

      protected static String PATHS
    • FALLBACK_DATA_TYPE

      protected static String FALLBACK_DATA_TYPE
    • QUERY_PARAMS_WITH_SUPPORTED_TYPE

      protected static String QUERY_PARAMS_WITH_SUPPORTED_TYPE
    • PARAMS_WITH_SUPPORTED_TYPE

      protected static String PARAMS_WITH_SUPPORTED_TYPE
  • Constructor Details

    • AkkaHttpServerCodegen

      public AkkaHttpServerCodegen()
  • Method Details

    • getTag

      public io.swagger.codegen.v3.CodegenType getTag()
    • getName

      public String getName()
    • getHelp

      public String getHelp()
    • postProcessOperations

      public Map<String,Object> postProcessOperations(Map<String,Object> objs)
      Specified by:
      postProcessOperations in interface io.swagger.codegen.v3.CodegenConfig
      Overrides:
      postProcessOperations in class DefaultCodegenConfig
    • setComplexTypes

      public static Map<String,Object> setComplexTypes(Map<String,Object> objs)
    • fromOperation

      public io.swagger.codegen.v3.CodegenOperation fromOperation(String path, String httpMethod, io.swagger.v3.oas.models.Operation operation, Map<String,io.swagger.v3.oas.models.media.Schema> schemas, io.swagger.v3.oas.models.OpenAPI openAPI)
      Description copied from class: DefaultCodegenConfig
      Convert Swagger Operation object to Codegen Operation object
      Specified by:
      fromOperation in interface io.swagger.codegen.v3.CodegenConfig
      Overrides:
      fromOperation in class DefaultCodegenConfig
      Parameters:
      path - the path of the operation
      httpMethod - HTTP method
      operation - Swagger operation object
      schemas - a map of schemas
      openAPI - a OpenAPI object representing the spec
      Returns:
      Codegen Operation object
    • getDefaultTemplateDir

      public String getDefaultTemplateDir()
      Specified by:
      getDefaultTemplateDir in class DefaultCodegenConfig
    • addLowercaseHttpMethod

      protected static void addLowercaseHttpMethod(io.swagger.codegen.v3.CodegenOperation codegenOperation)
      Provide a lowercase representation of the http method to map to the method directives of akka http
      See Also:
    • addPathMatcher

      protected static void addPathMatcher(io.swagger.codegen.v3.CodegenOperation codegenOperation)
      Split the path as a string to a list of strings to map to the path directives of akka http
      See Also:
    • addQueryParamsWithSupportedType

      protected static void addQueryParamsWithSupportedType(io.swagger.codegen.v3.CodegenOperation codegenOperation)
      Replace all not supported types of query parameters by the fallback type
    • addAllParamsWithSupportedTypes

      public static void addAllParamsWithSupportedTypes(io.swagger.codegen.v3.CodegenOperation codegenOperation)