Tabnine Logo
CliOption.setDefault
Code IndexAdd Tabnine to your IDE (free)

How to use
setDefault
method
in
io.swagger.codegen.CliOption

Best Java code snippets using io.swagger.codegen.CliOption.setDefault (Showing top 6 results out of 315)

origin: io.swagger/swagger-codegen-generators

public JavaJerseyServerCodegen() {
  super();
  outputFolder = "generated-code/JavaJaxRS-Jersey";
  CliOption library = new CliOption(CodegenConstants.LIBRARY, "library template (sub-template) to use");
  supportedLibraries.put(LIBRARY_JERSEY1, "Jersey core 1.x");
  supportedLibraries.put(LIBRARY_JERSEY2, "Jersey core 2.x");
  library.setEnum(supportedLibraries);
  library.setDefault(DEFAULT_JERSEY_LIBRARY);
  cliOptions.add(library);
  cliOptions.add(CliOption.newBoolean(SUPPORT_JAVA6, "Whether to support Java6 with the Jersey1/2 library."));
  cliOptions.add(CliOption.newBoolean(USE_TAGS, "use tags for creating interface and controller classnames"));
}
origin: io.swagger/swagger-codegen-generators

public JavaJAXRSSpecServerCodegen() {
  super();
  invokerPackage = "io.swagger.api";
  artifactId = "swagger-jaxrs-server";
  outputFolder = "generated-code/JavaJaxRS-Spec";
  additionalProperties.put("title", title);
  typeMapping.put("date", "LocalDate");
  importMapping.put("LocalDate", "org.joda.time.LocalDate");
  for (int i = 0; i < cliOptions.size(); i++) {
    if (CodegenConstants.LIBRARY.equals(cliOptions.get(i).getOpt())) {
      cliOptions.remove(i);
      break;
    }
  }
  CliOption library = new CliOption(CodegenConstants.LIBRARY, "library template (sub-template) to use");
  library.setDefault(DEFAULT_LIBRARY);
  Map<String, String> supportedLibraries = new LinkedHashMap<String, String>();
  supportedLibraries.put(DEFAULT_LIBRARY, "JAXRS");
  library.setEnum(supportedLibraries);
  cliOptions.add(library);
  cliOptions.add(CliOption.newBoolean(GENERATE_POM, "Whether to generate pom.xml if the file does not already exist.").defaultValue(String.valueOf(generatePom)));
  cliOptions.add(CliOption.newBoolean(INTERFACE_ONLY, "Whether to generate only API interface stubs without the server files.").defaultValue(String.valueOf(interfaceOnly)));
}
origin: com.centurylink.mdw/mdw-common

public SwaggerCodegen() {
  super();
  embeddedTemplateDir = "codegen";
  // standard opts to be overridden by user options
  outputFolder = ".";
  apiPackage = "com.centurylink.api.service";
  modelPackage = "com.centurylink.api.model";
  cliOptions.add(CliOption
      .newString(TRIM_API_PATHS, "Trim API paths and adjust package names accordingly")
      .defaultValue(Boolean.TRUE.toString()));
  additionalProperties.put(TRIM_API_PATHS, true);
  cliOptions.add(CliOption.newString(GENERATED_FLOW_BASE_PACKAGE,
      "Base package for generated microservice orchestration workflow processes"));
  // relevant once we submit a PR to swagger-code to become an official
  // java library
  supportedLibraries.put(NAME, getHelp());
  setLibrary(NAME);
  CliOption library = new CliOption(CodegenConstants.LIBRARY,
      "library template (sub-template) to use");
  library.setDefault(NAME);
  library.setEnum(supportedLibraries);
  library.setDefault(NAME);
  cliOptions.add(library);
}
origin: io.swagger/swagger-codegen-generators

libraryOption.setEnum(supportedLibraries);
libraryOption.setDefault("okhttp-gson");
cliOptions.add(libraryOption);
setLibrary("okhttp-gson");
origin: io.swagger/swagger-codegen-generators

library.setDefault(DEFAULT_LIBRARY);
library.setEnum(supportedLibraries);
library.setDefault(DEFAULT_LIBRARY);
cliOptions.add(library);
origin: io.swagger/swagger-codegen-generators

/**
 * Constructs an instance of `KotlinServerCodegen`.
 */
public KotlinServerCodegen() {
  super();
  artifactId = "kotlin-server";
  packageName = "io.swagger.server";
  outputFolder = "generated-code" + File.separator + "kotlin-server";
  modelTemplateFiles.put("model.mustache", ".kt");
  apiTemplateFiles.put("api.mustache", ".kt");
  embeddedTemplateDir = templateDir = "kotlin-server";
  apiPackage = packageName + ".apis";
  modelPackage = packageName + ".models";
  supportedLibraries.put("ktor", "ktor framework");
  // TODO: Configurable server engine. Defaults to netty in build.gradle.
  CliOption library = new CliOption(CodegenConstants.LIBRARY, "library template (sub-template) to use");
  library.setDefault(DEFAULT_LIBRARY);
  library.setEnum(supportedLibraries);
  cliOptions.add(library);
  addSwitch(Constants.AUTOMATIC_HEAD_REQUESTS, Constants.AUTOMATIC_HEAD_REQUESTS_DESC, getAutoHeadFeatureEnabled());
  addSwitch(Constants.CONDITIONAL_HEADERS, Constants.CONDITIONAL_HEADERS_DESC, getConditionalHeadersFeatureEnabled());
  addSwitch(Constants.HSTS, Constants.HSTS_DESC, getHstsFeatureEnabled());
  addSwitch(Constants.CORS, Constants.CORS_DESC, getCorsFeatureEnabled());
  addSwitch(Constants.COMPRESSION, Constants.COMPRESSION_DESC, getCompressionFeatureEnabled());
}
io.swagger.codegenCliOptionsetDefault

Popular methods of CliOption

  • getOpt
  • <init>
  • defaultValue
  • getOptionHelp
  • newBoolean
  • newString
  • setEnum

Popular in Java

  • Reactive rest calls using spring rest template
  • runOnUiThread (Activity)
  • getSystemService (Context)
  • getApplicationContext (Context)
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • Locale (java.util)
    Locale represents a language/country/variant combination. Locales are used to alter the presentatio
  • PriorityQueue (java.util)
    A PriorityQueue holds elements on a priority heap, which orders the elements according to their natu
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now