All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.swagger.codegen.CodegenConfig Maven / Gradle / Ivy

There is a newer version: 3.0.0-rc1
Show newest version
package io.swagger.codegen;

import java.util.List;
import java.util.Map;
import java.util.Set;

import com.samskivert.mustache.Mustache.Compiler;

import io.swagger.models.Model;
import io.swagger.models.Operation;
import io.swagger.models.Swagger;
import io.swagger.models.auth.SecuritySchemeDefinition;
import io.swagger.models.properties.Property;

public interface CodegenConfig {
    CodegenType getTag();

    String getName();

    String getHelp();

    Map additionalProperties();

    Map vendorExtensions();

    String testPackage();

    String apiPackage();

    String apiFileFolder();

    String apiTestFileFolder();

    String apiDocFileFolder();

    String fileSuffix();

    String outputFolder();

    String templateDir();

    String embeddedTemplateDir();

    String modelFileFolder();

    String modelTestFileFolder();

    String modelDocFileFolder();

    String modelPackage();

    String toApiName(String name);

    String toApiVarName(String name);

    String toModelName(String name);

    String toParamName(String name);

    String escapeText(String text);

    String escapeUnsafeCharacters(String input);

    String escapeReservedWord(String name);

    String escapeQuotationMark(String input);

    String getTypeDeclaration(Property p);

    String getTypeDeclaration(String name);

    void processOpts();

    List cliOptions();

    String generateExamplePath(String path, Operation operation);

    Set reservedWords();

    List supportingFiles();

    String getInputSpec();

    void setInputSpec(String inputSpec);

    String getOutputDir();

    void setOutputDir(String dir);

    CodegenModel fromModel(String name, Model model);

    CodegenModel fromModel(String name, Model model, Map allDefinitions);

    CodegenOperation fromOperation(String resourcePath, String httpMethod, Operation operation, Map definitions, Swagger swagger);

    CodegenOperation fromOperation(String resourcePath, String httpMethod, Operation operation, Map definitions);

    List fromSecurity(Map schemes);

    Set defaultIncludes();

    Map typeMapping();

    Map instantiationTypes();

    Map importMapping();

    Map apiTemplateFiles();

    Map modelTemplateFiles();

    Map apiTestTemplateFiles();

    Map modelTestTemplateFiles();

    Map apiDocTemplateFiles();

    Map modelDocTemplateFiles();

    Set languageSpecificPrimitives();

    Map reservedWordsMappings();

    void preprocessSwagger(Swagger swagger);

    void processSwagger(Swagger swagger);

    Compiler processCompiler(Compiler compiler);

    String sanitizeTag(String tag);

    String toApiFilename(String name);

    String toModelFilename(String name);

    String toApiTestFilename(String name);

    String toModelTestFilename(String name);

    String toApiDocFilename(String name);

    String toModelDocFilename(String name);

    String toModelImport(String name);

    String toApiImport(String name);

    void addOperationToGroup(String tag, String resourcePath, Operation operation, CodegenOperation co, Map> operations);

    Map postProcessAllModels(Map objs);

    Map postProcessModels(Map objs);

    Map postProcessOperations(Map objs);

    Map postProcessOperationsWithModels(Map objs, List allModels);

    Map postProcessSupportingFileData(Map objs);

    void postProcessModelProperty(CodegenModel model, CodegenProperty property);

    void postProcessParameter(CodegenParameter parameter);

    String apiFilename(String templateName, String tag);

    String modelFilename(String templateName, String modelName);

    String apiTestFilename(String templateName, String tag);

    String apiDocFilename(String templateName, String tag);

    boolean shouldOverwrite(String filename);

    boolean isSkipOverwrite();

    void setSkipOverwrite(boolean skipOverwrite);

    boolean isRemoveOperationIdPrefix();

    void setRemoveOperationIdPrefix(boolean removeOperationIdPrefix);

    public boolean isHideGenerationTimestamp();

    public void setHideGenerationTimestamp(boolean hideGenerationTimestamp);

    Map supportedLibraries();

    void setLibrary(String library);

    /**
     * Library template (sub-template).
     *
     * @return libray template
     */
    String getLibrary();

    void setGitUserId(String gitUserId);

    String getGitUserId();

    void setGitRepoId(String gitRepoId);

    String getGitRepoId();

    void setGitRepoBaseURL(String repositoryBaseURL);

    String getGitRepoBaseURL();

    void setReleaseNote(String releaseNote);

    String getReleaseNote();

    void setHttpUserAgent(String httpUserAgent);

    String getHttpUserAgent();

    String getCommonTemplateDir();

    void setIgnoreFilePathOverride(String ignoreFileOverride);

    String getIgnoreFilePathOverride();

    String toBooleanGetter(String name);

    String toSetter(String name);

    String toGetter(String name);

    String sanitizeName(String name);

    void setSkipAliasGeneration(Boolean skipAliasGeneration);

    Boolean getSkipAliasGeneration();

    boolean getIgnoreImportMapping();

    void setIgnoreImportMapping(boolean ignoreImportMapping);

    boolean defaultIgnoreImportMappingOption();

    boolean isUsingFlattenSpec();
}