Class StaticHtmlCodegen

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

    public class StaticHtmlCodegen
    extends DefaultCodegenConfig
    • Field Detail

      • invokerPackage

        protected String invokerPackage
      • groupId

        protected String groupId
      • artifactId

        protected String artifactId
      • artifactVersion

        protected String artifactVersion
    • Constructor Detail

      • StaticHtmlCodegen

        public StaticHtmlCodegen()
    • Method Detail

      • processOpts

        public void processOpts()
        Specified by:
        processOpts in interface io.swagger.codegen.v3.CodegenConfig
        Overrides:
        processOpts in class DefaultCodegenConfig
      • escapeText

        public String escapeText​(String input)
        Convert Markdown (CommonMark) to HTML. This class also disables normal HTML escaping in the Mustache engine (see processCompiler(Compiler) above.)
        Specified by:
        escapeText in interface io.swagger.codegen.v3.CodegenConfig
        Overrides:
        escapeText in class DefaultCodegenConfig
      • getTag

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

        public String getName()
      • getHelp

        public String getHelp()
      • 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
      • 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
      • toHtml

        public String toHtml​(String input)
        Convert Markdown text to HTML
        Parameters:
        input - text in Markdown; may be null.
        Returns:
        the text, converted to Markdown. For null input, "" is returned.
      • toModelName

        public String toModelName​(String name)
        Description copied from class: DefaultCodegenConfig
        Output the proper model name (capitalized). In case the name belongs to the TypeSystem it won't be renamed.
        Specified by:
        toModelName in interface io.swagger.codegen.v3.CodegenConfig
        Overrides:
        toModelName in class DefaultCodegenConfig
        Parameters:
        name - the name of the model
        Returns:
        capitalized model name
      • 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
      • postProcessParameter

        public void postProcessParameter​(io.swagger.codegen.v3.CodegenParameter parameter)
        Specified by:
        postProcessParameter in interface io.swagger.codegen.v3.CodegenConfig
        Overrides:
        postProcessParameter in class DefaultCodegenConfig
      • postProcessModelProperty

        public void postProcessModelProperty​(io.swagger.codegen.v3.CodegenModel model,
                                             io.swagger.codegen.v3.CodegenProperty property)
        Specified by:
        postProcessModelProperty in interface io.swagger.codegen.v3.CodegenConfig
        Overrides:
        postProcessModelProperty in class DefaultCodegenConfig
      • getSchemaHandler

        public io.swagger.codegen.v3.ISchemaHandler getSchemaHandler()
        Specified by:
        getSchemaHandler in interface io.swagger.codegen.v3.CodegenConfig
        Overrides:
        getSchemaHandler in class DefaultCodegenConfig