Class ElixirClientCodegen

    • Constructor Detail

      • ElixirClientCodegen

        public ElixirClientCodegen()
    • Method Detail

      • getName

        public String getName()
        Configures a friendly name for the generator. This will be used by the generator to select the library with the -l flag.
        Specified by:
        getName in interface CodegenConfig
        Returns:
        the friendly name for the generator
      • getHelp

        public String getHelp()
        Returns human-friendly help for the generator. Provide the consumer with help tips, parameters here
        Specified by:
        getHelp in interface CodegenConfig
        Returns:
        A string value for the help message
      • fromModel

        public CodegenModel fromModel​(String name,
                                      io.swagger.models.Model model,
                                      Map<String,​io.swagger.models.Model> allDefinitions)
        Description copied from class: DefaultCodegen
        Convert Swagger Model object to Codegen Model object
        Specified by:
        fromModel in interface CodegenConfig
        Overrides:
        fromModel in class DefaultCodegen
        Parameters:
        name - the name of the model
        model - Swagger Model object
        allDefinitions - a map of all Swagger models from the spec
        Returns:
        Codegen Model object
      • escapeReservedWord

        public String escapeReservedWord​(String name)
        Escapes a reserved word as defined in the `reservedWords` array. Handle escaping those terms here. This logic is only called if a variable matches the reserved words
        Specified by:
        escapeReservedWord in interface CodegenConfig
        Overrides:
        escapeReservedWord in class DefaultCodegen
        Parameters:
        name - the name to be escaped
        Returns:
        the escaped term
      • toApiName

        public String toApiName​(String name)
        Description copied from class: DefaultCodegen
        Output the API (class) name (capitalized) ending with "Api" Return DefaultApi if name is empty
        Specified by:
        toApiName in interface CodegenConfig
        Overrides:
        toApiName in class DefaultCodegen
        Parameters:
        name - the name of the Api
        Returns:
        capitalized Api name ending with "Api"
      • toModelName

        public String toModelName​(String name)
        Description copied from class: DefaultCodegen
        Output the proper model name (capitalized). In case the name belongs to the TypeSystem it won't be renamed.
        Specified by:
        toModelName in interface CodegenConfig
        Overrides:
        toModelName in class DefaultCodegen
        Parameters:
        name - the name of the model
        Returns:
        capitalized model name
      • toOperationId

        public String toOperationId​(String operationId)
        Description copied from class: DefaultCodegen
        Return the operation ID (method name)
        Overrides:
        toOperationId in class DefaultCodegen
        Parameters:
        operationId - operation ID
        Returns:
        the sanitized method name
      • getTypeDeclaration

        public String getTypeDeclaration​(io.swagger.models.properties.Property p)
        Optional - type declaration. This is a String which is used by the templates to instantiate your types. There is typically special handling for different property types
        Specified by:
        getTypeDeclaration in interface CodegenConfig
        Overrides:
        getTypeDeclaration in class DefaultCodegen
        Parameters:
        p - Swagger Property object
        Returns:
        a string value used as the `dataType` field for model templates, `returnType` for api templates
      • getSwaggerType

        public String getSwaggerType​(io.swagger.models.properties.Property p)
        Optional - swagger type conversion. This is used to map swagger types in a `Property` into either language specific types via `typeMapping` or into complex models if there is not a mapping.
        Overrides:
        getSwaggerType in class DefaultCodegen
        Parameters:
        p - Swagger property object
        Returns:
        a string value of the type or complex model for this property
        See Also:
        Property
      • setModuleName

        public void setModuleName​(String moduleName)