Class AkkaHttpServerCodegen

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

    public class AkkaHttpServerCodegen
    extends AbstractScalaCodegen
    • Field Detail

      • 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
      • COOKIE_DATA_TYPE

        protected static String COOKIE_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 Detail

      • AkkaHttpServerCodegen

        public AkkaHttpServerCodegen()
    • Method Detail

      • getTag

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

        public String getName()
      • getHelp

        public String getHelp()
      • 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
      • 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:
        Akka Http Documentation
      • 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:
        Akka Http Documentation
      • 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)