Class StaticHtml2Codegen

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

    public class StaticHtml2Codegen
    extends DefaultCodegenConfig
    implements io.swagger.codegen.v3.CodegenConfig
    • Field Detail

      • invokerPackage

        protected String invokerPackage
      • phpInvokerPackage

        protected String phpInvokerPackage
      • packageName

        protected String packageName
      • groupId

        protected String groupId
      • artifactId

        protected String artifactId
      • artifactVersion

        protected String artifactVersion
      • jsProjectName

        protected String jsProjectName
      • jsModuleName

        protected String jsModuleName
      • perlModuleName

        protected String perlModuleName
      • pythonPackageName

        protected String pythonPackageName
    • Constructor Detail

      • StaticHtml2Codegen

        public StaticHtml2Codegen()
    • Method Detail

      • getTag

        public io.swagger.codegen.v3.CodegenType getTag()
        Specified by:
        getTag in interface io.swagger.codegen.v3.CodegenConfig
      • getName

        public String getName()
        Specified by:
        getName in interface io.swagger.codegen.v3.CodegenConfig
      • getHelp

        public String getHelp()
        Specified by:
        getHelp in interface io.swagger.codegen.v3.CodegenConfig
      • getTypeDeclaration

        public String getTypeDeclaration​(io.swagger.v3.oas.models.media.Schema propertySchema)
        Description copied from class: DefaultCodegenConfig
        Output the type declaration of the property
        Specified by:
        getTypeDeclaration in interface io.swagger.codegen.v3.CodegenConfig
        Overrides:
        getTypeDeclaration in class DefaultCodegenConfig
        Parameters:
        propertySchema - Schema Property object
        Returns:
        a string presentation of the property type
      • preprocessOpenAPI

        public void preprocessOpenAPI​(io.swagger.v3.oas.models.OpenAPI openAPI)
        Specified by:
        preprocessOpenAPI in interface io.swagger.codegen.v3.CodegenConfig
        Overrides:
        preprocessOpenAPI in class DefaultCodegenConfig
      • 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> definitions,
                                                                    io.swagger.v3.oas.models.OpenAPI ope)
        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
        definitions - a map of schemas
        ope - a OpenAPI object representing the spec
        Returns:
        Codegen Operation object
      • postProcessParameterEnum

        public List<io.swagger.codegen.v3.CodegenParameter> postProcessParameterEnum​(List<io.swagger.codegen.v3.CodegenParameter> parameterList)
        Format to HTML the enums contained in every operations
        Parameters:
        parameterList - The whole parameters contained in one operation
        Returns:
        String | Html formated enum
      • normalizeType

        public String normalizeType​(String type)
        Normalize type by wrapping primitive types with single quotes.
        Parameters:
        type - Primitive type
        Returns:
        Normalized type
      • escapeQuotationMark

        public String escapeQuotationMark​(String input)
        Description copied from class: DefaultCodegenConfig
        Escape single and/or double quote to avoid code injection
        Specified by:
        escapeQuotationMark in interface io.swagger.codegen.v3.CodegenConfig
        Overrides:
        escapeQuotationMark in class DefaultCodegenConfig
        Parameters:
        input - String to be cleaned up
        Returns:
        string with quotation mark removed or escaped
      • escapeUnsafeCharacters

        public String escapeUnsafeCharacters​(String input)
        Description copied from class: DefaultCodegenConfig
        override with any special text escaping logic to handle unsafe characters so as to avoid code injection
        Specified by:
        escapeUnsafeCharacters in interface io.swagger.codegen.v3.CodegenConfig
        Overrides:
        escapeUnsafeCharacters in class DefaultCodegenConfig
        Parameters:
        input - String to be cleaned up
        Returns:
        string with unsafe characters removed or escaped