Class TypeScriptFetchClientCodegen

    • Field Detail

      • npmRepository

        protected String npmRepository
      • importFileExtension

        protected String importFileExtension
      • addedApiIndex

        protected boolean addedApiIndex
      • addedModelIndex

        protected boolean addedModelIndex
      • withoutRuntimeChecks

        protected boolean withoutRuntimeChecks
      • stringEnums

        protected boolean stringEnums
      • DETECT_PASSTHROUGH_MODELS_WITH_SUFFIX_AND_FIELD

        public static final String DETECT_PASSTHROUGH_MODELS_WITH_SUFFIX_AND_FIELD
        See Also:
        Constant Field Values
      • INFER_ENTITY_FROM_UNIQUE_ID_WITH_NAME

        public static final String INFER_ENTITY_FROM_UNIQUE_ID_WITH_NAME
        See Also:
        Constant Field Values
      • sagasAndRecords

        protected boolean sagasAndRecords
      • detectPassthroughModelsWithSuffixAndField

        protected String detectPassthroughModelsWithSuffixAndField
      • inferUniqueIdFromNameSuffix

        protected boolean inferUniqueIdFromNameSuffix
      • inferEntityFromUniqueIdWithName

        protected String inferEntityFromUniqueIdWithName
      • packageAsSourceOnlyLibrary

        protected boolean packageAsSourceOnlyLibrary
    • Constructor Detail

      • TypeScriptFetchClientCodegen

        public TypeScriptFetchClientCodegen()
    • Method Detail

      • getNpmRepository

        public String getNpmRepository()
      • setNpmRepository

        public void setNpmRepository​(String npmRepository)
      • getImportFileExtension

        public String getImportFileExtension()
      • setImportFileExtension

        public void setImportFileExtension​(String importFileExtension)
      • getWithoutRuntimeChecks

        public Boolean getWithoutRuntimeChecks()
      • setWithoutRuntimeChecks

        public void setWithoutRuntimeChecks​(Boolean withoutRuntimeChecks)
      • getStringEnums

        public Boolean getStringEnums()
      • setStringEnums

        public void setStringEnums​(Boolean stringEnums)
      • getSagasAndRecords

        public Boolean getSagasAndRecords()
      • setSagasAndRecords

        public void setSagasAndRecords​(Boolean sagasAndRecords)
      • getPassthroughSuffix

        public String getPassthroughSuffix()
      • getPassthroughField

        public String getPassthroughField()
      • getDetectPassthroughModelsWithSuffixAndField

        public String getDetectPassthroughModelsWithSuffixAndField()
      • setDetectPassthroughModelsWithSuffixAndField

        public void setDetectPassthroughModelsWithSuffixAndField​(String detectPassthroughModelsWithSuffixAndField)
      • getInferUniqueIdFromNameSuffix

        public boolean getInferUniqueIdFromNameSuffix()
      • setInferUniqueIdFromNameSuffix

        public void setInferUniqueIdFromNameSuffix​(boolean inferUniqueIdFromNameSuffix)
      • getInferEntityFromUniqueIdWithName

        public String getInferEntityFromUniqueIdWithName()
      • setInferEntityFromUniqueIdWithName

        public void setInferEntityFromUniqueIdWithName​(String inferEntityFromUniqueIdWithName)
      • getPackageAsSourceOnlyLibrary

        public boolean getPackageAsSourceOnlyLibrary()
      • setPackageAsSourceOnlyLibrary

        public void setPackageAsSourceOnlyLibrary​(boolean packageAsSourceOnlyLibrary)
      • isUniqueIdAccordingToNameSuffix

        public boolean isUniqueIdAccordingToNameSuffix​(String name)
      • addMustacheLambdas

        protected com.google.common.collect.ImmutableMap.Builder<String,​com.samskivert.mustache.Mustache.Lambda> addMustacheLambdas()
        Description copied from class: DefaultCodegen
        Preset map builder with commonly used Mustache lambdas. To extend the map, override addMustacheLambdas(), call parent method first and then add additional lambdas to the returned builder. If common lambdas are not desired, override addMustacheLambdas() method and return empty builder.
        Overrides:
        addMustacheLambdas in class DefaultCodegen
        Returns:
        preinitialized map with common lambdas
      • addAdditionPropertiesToCodeGenModel

        protected void addAdditionPropertiesToCodeGenModel​(CodegenModel codegenModel,
                                                           io.swagger.v3.oas.models.media.Schema schema)
        Description copied from class: DefaultCodegen
        Handle the model for the 'additionalProperties' keyword in the OAS schema.
        Overrides:
        addAdditionPropertiesToCodeGenModel in class DefaultCodegen
        Parameters:
        codegenModel - The codegen representation of the schema.
        schema - The input OAS schema.
      • fromParameter

        public org.openapitools.codegen.languages.TypeScriptFetchClientCodegen.ExtendedCodegenParameter fromParameter​(io.swagger.v3.oas.models.parameters.Parameter parameter,
                                                                                                                      Set<String> imports)
        Description copied from class: DefaultCodegen
        Convert OAS Parameter object to Codegen Parameter object
        Overrides:
        fromParameter in class DefaultCodegen
        Parameters:
        parameter - OAS parameter object
        imports - set of imports for library/package/module
        Returns:
        Codegen Parameter object
      • fromProperty

        public org.openapitools.codegen.languages.TypeScriptFetchClientCodegen.ExtendedCodegenProperty fromProperty​(String name,
                                                                                                                    io.swagger.v3.oas.models.media.Schema p,
                                                                                                                    boolean required)
        Description copied from class: DefaultCodegen
        TODO remove this in 7.0.0 as a breaking change This method was kept when required was added to the fromProperty signature to ensure that the change was non-breaking
        Overrides:
        fromProperty in class DefaultCodegen
        Parameters:
        name - name of the property
        p - OAS property schema
        required - true if the property is required in the next higher object schema, false otherwise
        Returns:
        Codegen Property object
      • fromModel

        public org.openapitools.codegen.languages.TypeScriptFetchClientCodegen.ExtendedCodegenModel fromModel​(String name,
                                                                                                              io.swagger.v3.oas.models.media.Schema model)
        Description copied from class: DefaultCodegen
        Convert OAS 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 - OAS Model object
        Returns:
        Codegen Model object
      • fromOperation

        public org.openapitools.codegen.languages.TypeScriptFetchClientCodegen.ExtendedCodegenOperation fromOperation​(String path,
                                                                                                                      String httpMethod,
                                                                                                                      io.swagger.v3.oas.models.Operation operation,
                                                                                                                      List<io.swagger.v3.oas.models.servers.Server> servers)
        Description copied from class: DefaultCodegen
        Convert OAS Operation object to Codegen Operation object
        Specified by:
        fromOperation in interface CodegenConfig
        Overrides:
        fromOperation in class DefaultCodegen
        Parameters:
        path - the path of the operation
        httpMethod - HTTP method
        operation - OAS operation object
        servers - list of servers
        Returns:
        Codegen Operation object