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

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

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

origin: io.swagger/swagger-codegen-generators

/**
 * Constructs an instance of `KotlinClientCodegen`.
 */
public KotlinClientCodegen() {
  super();
  artifactId = "kotlin-client";
  packageName = "io.swagger.client";
  outputFolder = "generated-code" + File.separator + "kotlin-client";
  modelTemplateFiles.put("model.mustache", ".kt");
  apiTemplateFiles.put("api.mustache", ".kt");
  modelDocTemplateFiles.put("model_doc.mustache", ".md");
  apiDocTemplateFiles.put("api_doc.mustache", ".md");
  embeddedTemplateDir = templateDir = "kotlin-client";
  apiPackage = packageName + ".apis";
  modelPackage = packageName + ".models";
  CliOption dateLibrary = new CliOption(DATE_LIBRARY, "Option. Date library to use");
  Map<String, String> dateOptions = new HashMap<>();
  dateOptions.put(DateLibrary.THREETENBP.value, "Threetenbp");
  dateOptions.put(DateLibrary.STRING.value, "String");
  dateOptions.put(DateLibrary.JAVA8.value, "Java 8 native JSR310");
  dateLibrary.setEnum(dateOptions);
  cliOptions.add(dateLibrary);
}
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: io.swagger/swagger-codegen-generators

libraryOption.setEnum(supportedLibraries);
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

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

dateOptions.put("joda", "Joda (for legacy app only)");
dateOptions.put("legacy", "Legacy java.util.Date (if you really have a good reason not to use threetenbp");
dateLibrary.setEnum(dateOptions);
cliOptions.add(dateLibrary);
java8ModeOptions.put("true", "Use Java 8 classes such as Base64");
java8ModeOptions.put("false", "Various third party libraries as needed");
java8Mode.setEnum(java8ModeOptions);
cliOptions.add(java8Mode);
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.codegenCliOptionsetEnum

Popular methods of CliOption

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

Popular in Java

  • Reactive rest calls using spring rest template
  • setRequestProperty (URLConnection)
  • getApplicationContext (Context)
  • requestLocationUpdates (LocationManager)
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • Timer (java.util)
    Timers schedule one-shot or recurring TimerTask for execution. Prefer java.util.concurrent.Scheduled
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • CodeWhisperer 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