Rename sagger metadata and more (#208)

* Rename groupId, artifactId, project name, title, ...
* Remove .swagger-codegen/VERSION file
This commit is contained in:
Jérémie Bresson 2018-04-24 08:08:53 +02:00 committed by GitHub
parent 7fe555a519
commit 5340c35ce1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
50 changed files with 128 additions and 123 deletions

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
# grep for '<<<<<<< HEAD' in openapi generator # grep for '<<<<<<< HEAD' in openapi-generator
grep -RUIl '<<<<<<< HEAD' modules/openapi-generator/src grep -RUIl '<<<<<<< HEAD' modules/openapi-generator/src
if [ $? -ne 1 ]; then if [ $? -ne 1 ]; then

View File

@ -12,7 +12,7 @@ import org.openapitools.codegen.cmd.Version;
/** /**
* User: lanwen Date: 24.03.15 Time: 17:56 * User: lanwen Date: 24.03.15 Time: 17:56
* <p> * <p>
* Command line interface for openapi generator use `openapi-generator-cli.jar help` for more info * Command line interface for OpenAPI Generator use `openapi-generator-cli.jar help` for more info
* *
* @since 2.1.3-M1 * @since 2.1.3-M1
*/ */

View File

@ -10,7 +10,7 @@
<artifactId>openapi-generator-maven-plugin</artifactId> <artifactId>openapi-generator-maven-plugin</artifactId>
<name>openapi-generator (maven-plugin)</name> <name>openapi-generator (maven-plugin)</name>
<packaging>maven-plugin</packaging> <packaging>maven-plugin</packaging>
<description>maven plugin to build modules from openapi generator</description> <description>maven plugin to build modules from OpenAPI Generator</description>
<prerequisites> <prerequisites>
<maven>3.2.5</maven> <maven>3.2.5</maven>
</prerequisites> </prerequisites>

View File

@ -176,16 +176,16 @@ public class CodegenConstants {
public static final String OPTIONAL_EMIT_DEFAULT_VALUES_DESC = "Set DataMember's EmitDefaultValue."; public static final String OPTIONAL_EMIT_DEFAULT_VALUES_DESC = "Set DataMember's EmitDefaultValue.";
public static final String GIT_USER_ID = "gitUserId"; public static final String GIT_USER_ID = "gitUserId";
public static final String GIT_USER_ID_DESC = "Git user ID, e.g. swagger-api."; public static final String GIT_USER_ID_DESC = "Git user ID, e.g. openapitools.";
public static final String GIT_REPO_ID = "gitRepoId"; public static final String GIT_REPO_ID = "gitRepoId";
public static final String GIT_REPO_ID_DESC = "Git repo ID, e.g. swagger-codegen."; public static final String GIT_REPO_ID_DESC = "Git repo ID, e.g. openapi-generator.";
public static final String RELEASE_NOTE = "releaseNote"; public static final String RELEASE_NOTE = "releaseNote";
public static final String RELEASE_NOTE_DESC = "Release note, default to 'Minor update'."; public static final String RELEASE_NOTE_DESC = "Release note, default to 'Minor update'.";
public static final String HTTP_USER_AGENT = "httpUserAgent"; public static final String HTTP_USER_AGENT = "httpUserAgent";
public static final String HTTP_USER_AGENT_DESC = "HTTP user agent, e.g. codegen_csharp_api_client, default to 'Swagger-Codegen/{packageVersion}}/{language}'"; public static final String HTTP_USER_AGENT_DESC = "HTTP user agent, e.g. codegen_csharp_api_client, default to 'OpenAPI-Generator/{packageVersion}}/{language}'";
public static final String SUPPORTS_ES6 = "supportsES6"; public static final String SUPPORTS_ES6 = "supportsES6";
public static final String SUPPORTS_ES6_DESC = "Generate code that conforms to ES6."; public static final String SUPPORTS_ES6_DESC = "Generate code that conforms to ES6.";

View File

@ -3785,7 +3785,7 @@ public class DefaultCodegen implements CodegenConfig {
} }
/** /**
* Sets an override location for the .swagger-codegen.ignore location for the first code generation. * Sets an override location for the '.openapi-generator-ignore' location for the first code generation.
* *
* @param ignoreFileOverride The full path to an ignore file * @param ignoreFileOverride The full path to an ignore file
*/ */
@ -4239,7 +4239,7 @@ public class DefaultCodegen implements CodegenConfig {
final ArraySchema arraySchema = (ArraySchema) schema; final ArraySchema arraySchema = (ArraySchema) schema;
Schema inner = arraySchema.getItems(); Schema inner = arraySchema.getItems();
if (inner == null) { if (inner == null) {
inner = new StringSchema().description("//TODO automatically added by swagger-codegen"); inner = new StringSchema().description("//TODO automatically added by openapi-generator");
arraySchema.setItems(inner); arraySchema.setItems(inner);
} }
CodegenProperty codegenProperty = fromProperty("property", schema); CodegenProperty codegenProperty = fromProperty("property", schema);
@ -4272,7 +4272,7 @@ public class DefaultCodegen implements CodegenConfig {
} else if (ModelUtils.isMapSchema(schema)) { } else if (ModelUtils.isMapSchema(schema)) {
Schema inner = (Schema) schema.getAdditionalProperties(); Schema inner = (Schema) schema.getAdditionalProperties();
if (inner == null) { if (inner == null) {
inner = new StringSchema().description("//TODO automatically added by swagger-codegen"); inner = new StringSchema().description("//TODO automatically added by openapi-generator");
schema.setAdditionalProperties(inner); schema.setAdditionalProperties(inner);
} }
CodegenProperty codegenProperty = fromProperty("property", schema); CodegenProperty codegenProperty = fromProperty("property", schema);

View File

@ -77,7 +77,7 @@ public class DefaultGenerator extends AbstractGenerator implements Generator {
} }
/** /**
* Programmatically disable the output of .swagger-codegen/VERSION, .openapi-generator-ignore, * Programmatically disable the output of .openapi-generator/VERSION, .openapi-generator-ignore,
* or other metadata files used by Swagger Codegen. * or other metadata files used by Swagger Codegen.
* @param generateMetadata true: enable outputs, false: disable outputs * @param generateMetadata true: enable outputs, false: disable outputs
*/ */
@ -676,7 +676,7 @@ public class DefaultGenerator extends AbstractGenerator implements Generator {
/* /*
* The following code adds default LICENSE (Apache-2.0) for all generators * The following code adds default LICENSE (Apache-2.0) for all generators
* To use license other than Apache2.0, update the following file: * To use license other than Apache2.0, update the following file:
* modules/swagger-codegen/src/main/resources/_common/LICENSE * modules/openapi-generator/src/main/resources/_common/LICENSE
* *
final String apache2License = "LICENSE"; final String apache2License = "LICENSE";
String licenseFileNameTarget = config.outputFolder() + File.separator + apache2License; String licenseFileNameTarget = config.outputFolder() + File.separator + apache2License;

View File

@ -45,18 +45,18 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
protected boolean java8Mode = false; protected boolean java8Mode = false;
protected boolean withXml = false; protected boolean withXml = false;
protected String invokerPackage = "io.swagger"; protected String invokerPackage = "io.swagger";
protected String groupId = "io.swagger"; protected String groupId = "org.openapitools";
protected String artifactId = "swagger-java"; protected String artifactId = "openapi-java";
protected String artifactVersion = "1.0.0"; protected String artifactVersion = "1.0.0";
protected String artifactUrl = "https://github.com/swagger-api/swagger-codegen"; protected String artifactUrl = "https://github.com/openapitools/openapi-generator";
protected String artifactDescription = "Swagger Java"; protected String artifactDescription = "OpenAPI Java";
protected String developerName = "Swagger"; protected String developerName = "OpenAPI";
protected String developerEmail = "apiteam@swagger.io"; protected String developerEmail = "team@openapitools.org";
protected String developerOrganization = "Swagger"; protected String developerOrganization = "OpenAPI";
protected String developerOrganizationUrl = "http://swagger.io"; protected String developerOrganizationUrl = "http://openapitools.org";
protected String scmConnection = "scm:git:git@github.com:swagger-api/swagger-codegen.git"; protected String scmConnection = "scm:git:git@github.com:openapitools/openapi-generator.git";
protected String scmDeveloperConnection = "scm:git:git@github.com:swagger-api/swagger-codegen.git"; protected String scmDeveloperConnection = "scm:git:git@github.com:openapitools/openapi-generator.git";
protected String scmUrl = "https://github.com/swagger-api/swagger-codegen"; protected String scmUrl = "https://github.com/openapitools/openapi-generator";
protected String licenseName = "Unlicense"; protected String licenseName = "Unlicense";
protected String licenseUrl = "http://unlicense.org"; protected String licenseUrl = "http://unlicense.org";
protected String projectFolder = "src" + File.separator + "main"; protected String projectFolder = "src" + File.separator + "main";

View File

@ -30,7 +30,7 @@ public abstract class AbstractJavaJAXRSServerCodegen extends AbstractJavaCodegen
protected static final String JAXRS_TEMPLATE_DIRECTORY_NAME = "JavaJaxRS"; protected static final String JAXRS_TEMPLATE_DIRECTORY_NAME = "JavaJaxRS";
protected String implFolder = "src/main/java"; protected String implFolder = "src/main/java";
protected String testResourcesFolder = "src/test/resources"; protected String testResourcesFolder = "src/test/resources";
protected String title = "Swagger Server"; protected String title = "OpenAPI Server";
protected boolean useBeanValidation = true; protected boolean useBeanValidation = true;
@ -41,7 +41,7 @@ public abstract class AbstractJavaJAXRSServerCodegen extends AbstractJavaCodegen
sourceFolder = "src/gen/java"; sourceFolder = "src/gen/java";
invokerPackage = "org.openapitools.api"; invokerPackage = "org.openapitools.api";
artifactId = "swagger-jaxrs-server"; artifactId = "openapi-jaxrs-server";
dateLibrary = "legacy"; //TODO: add joda support to all jax-rs dateLibrary = "legacy"; //TODO: add joda support to all jax-rs
apiPackage = "org.openapitools.api"; apiPackage = "org.openapitools.api";

View File

@ -24,7 +24,7 @@ public abstract class AbstractKotlinCodegen extends DefaultCodegen implements Co
protected String artifactId; protected String artifactId;
protected String artifactVersion = "1.0.0"; protected String artifactVersion = "1.0.0";
protected String groupId = "io.swagger"; protected String groupId = "org.openapitools";
protected String packageName; protected String packageName;
protected String sourceFolder = "src/main/kotlin"; protected String sourceFolder = "src/main/kotlin";

View File

@ -128,9 +128,9 @@ public abstract class AbstractPhpCodegen extends DefaultCodegen implements Codeg
cliOptions.add(new CliOption(CodegenConstants.INVOKER_PACKAGE, "The main namespace to use for all classes. e.g. Yay\\Pets")); cliOptions.add(new CliOption(CodegenConstants.INVOKER_PACKAGE, "The main namespace to use for all classes. e.g. Yay\\Pets"));
cliOptions.add(new CliOption(PACKAGE_PATH, "The main package name for classes. e.g. GeneratedPetstore")); cliOptions.add(new CliOption(PACKAGE_PATH, "The main package name for classes. e.g. GeneratedPetstore"));
cliOptions.add(new CliOption(SRC_BASE_PATH, "The directory under packagePath to serve as source root.")); cliOptions.add(new CliOption(SRC_BASE_PATH, "The directory under packagePath to serve as source root."));
// cliOptions.add(new CliOption(COMPOSER_VENDOR_NAME, "The vendor name used in the composer package name. The template uses {{composerVendorName}}/{{composerProjectName}} for the composer package name. e.g. yaypets. IMPORTANT NOTE (2016/03): composerVendorName will be deprecated and replaced by gitUserId in the next swagger-codegen release")); // cliOptions.add(new CliOption(COMPOSER_VENDOR_NAME, "The vendor name used in the composer package name. The template uses {{composerVendorName}}/{{composerProjectName}} for the composer package name. e.g. yaypets. IMPORTANT NOTE (2016/03): composerVendorName will be deprecated and replaced by gitUserId in the next openapi-generator release"));
cliOptions.add(new CliOption(CodegenConstants.GIT_USER_ID, CodegenConstants.GIT_USER_ID_DESC)); cliOptions.add(new CliOption(CodegenConstants.GIT_USER_ID, CodegenConstants.GIT_USER_ID_DESC));
// cliOptions.add(new CliOption(COMPOSER_PROJECT_NAME, "The project name used in the composer package name. The template uses {{composerVendorName}}/{{composerProjectName}} for the composer package name. e.g. petstore-client. IMPORTANT NOTE (2016/03): composerProjectName will be deprecated and replaced by gitRepoId in the next swagger-codegen release")); // cliOptions.add(new CliOption(COMPOSER_PROJECT_NAME, "The project name used in the composer package name. The template uses {{composerVendorName}}/{{composerProjectName}} for the composer package name. e.g. petstore-client. IMPORTANT NOTE (2016/03): composerProjectName will be deprecated and replaced by gitRepoId in the next openapi-generator release"));
cliOptions.add(new CliOption(CodegenConstants.GIT_REPO_ID, CodegenConstants.GIT_REPO_ID_DESC)); cliOptions.add(new CliOption(CodegenConstants.GIT_REPO_ID, CodegenConstants.GIT_REPO_ID_DESC));
cliOptions.add(new CliOption(CodegenConstants.ARTIFACT_VERSION, "The version to use in the composer package version field. e.g. 1.2.3")); cliOptions.add(new CliOption(CodegenConstants.ARTIFACT_VERSION, "The version to use in the composer package version field. e.g. 1.2.3"));
} }

View File

@ -27,8 +27,8 @@ public class AndroidClientCodegen extends DefaultCodegen implements CodegenConfi
public static final String ANDROID_SDK_VERSION = "androidSdkVersion"; public static final String ANDROID_SDK_VERSION = "androidSdkVersion";
public static final String ANDROID_BUILD_TOOLS_VERSION = "androidBuildToolsVersion"; public static final String ANDROID_BUILD_TOOLS_VERSION = "androidBuildToolsVersion";
protected String invokerPackage = "io.swagger.client"; protected String invokerPackage = "io.swagger.client";
protected String groupId = "io.swagger"; protected String groupId = "org.openapitools";
protected String artifactId = "swagger-android-client"; protected String artifactId = "openapi-android-client";
protected String artifactVersion = "1.0.0"; protected String artifactVersion = "1.0.0";
protected String projectFolder = "src/main"; protected String projectFolder = "src/main";
protected String sourceFolder = projectFolder + "/java"; protected String sourceFolder = projectFolder + "/java";

View File

@ -41,7 +41,7 @@ public class ClojureClientCodegen extends DefaultCodegen implements CodegenConfi
embeddedTemplateDir = templateDir = "clojure"; embeddedTemplateDir = templateDir = "clojure";
cliOptions.add(new CliOption(PROJECT_NAME, cliOptions.add(new CliOption(PROJECT_NAME,
"name of the project (Default: generated from info.title or \"swagger-clj-client\")")); "name of the project (Default: generated from info.title or \"openapi-clj-client\")"));
cliOptions.add(new CliOption(PROJECT_DESCRIPTION, cliOptions.add(new CliOption(PROJECT_DESCRIPTION,
"description of the project (Default: using info.description or \"Client library of <projectNname>\")")); "description of the project (Default: using info.description or \"Client library of <projectNname>\")"));
cliOptions.add(new CliOption(PROJECT_VERSION, cliOptions.add(new CliOption(PROJECT_VERSION,
@ -122,7 +122,7 @@ public class ClojureClientCodegen extends DefaultCodegen implements CodegenConfi
// default values // default values
if (projectName == null) { if (projectName == null) {
projectName = "swagger-clj-client"; projectName = "openapi-clj-client";
} }
if (projectVersion == null) { if (projectVersion == null) {
projectVersion = "1.0.0"; projectVersion = "1.0.0";

View File

@ -14,8 +14,8 @@ import java.util.Map;
public class ConfluenceWikiCodegen extends DefaultCodegen implements CodegenConfig { public class ConfluenceWikiCodegen extends DefaultCodegen implements CodegenConfig {
private static final String ALL_OPERATIONS = ""; private static final String ALL_OPERATIONS = "";
protected String invokerPackage = "io.swagger.client"; protected String invokerPackage = "io.swagger.client";
protected String groupId = "io.swagger"; protected String groupId = "org.openapitools";
protected String artifactId = "swagger-client"; protected String artifactId = "openapi-client";
protected String artifactVersion = "1.0.0"; protected String artifactVersion = "1.0.0";
public ConfluenceWikiCodegen() { public ConfluenceWikiCodegen() {
@ -36,8 +36,8 @@ public class ConfluenceWikiCodegen extends DefaultCodegen implements CodegenConf
cliOptions.add(new CliOption(CodegenConstants.ARTIFACT_ID, CodegenConstants.ARTIFACT_ID_DESC)); cliOptions.add(new CliOption(CodegenConstants.ARTIFACT_ID, CodegenConstants.ARTIFACT_ID_DESC));
cliOptions.add(new CliOption(CodegenConstants.ARTIFACT_VERSION, CodegenConstants.ARTIFACT_VERSION_DESC)); cliOptions.add(new CliOption(CodegenConstants.ARTIFACT_VERSION, CodegenConstants.ARTIFACT_VERSION_DESC));
additionalProperties.put("appName", "Swagger Sample"); additionalProperties.put("appName", "OpenAPI Sample");
additionalProperties.put("appDescription", "A sample swagger server"); additionalProperties.put("appDescription", "A sample openapi server");
additionalProperties.put("infoUrl", "https://helloreverb.com"); additionalProperties.put("infoUrl", "https://helloreverb.com");
additionalProperties.put("infoEmail", "hello@helloreverb.com"); additionalProperties.put("infoEmail", "hello@helloreverb.com");
additionalProperties.put("licenseInfo", "All rights reserved"); additionalProperties.put("licenseInfo", "All rights reserved");

View File

@ -28,7 +28,7 @@ import java.util.Map;
public class FinchServerCodegen extends DefaultCodegen implements CodegenConfig { public class FinchServerCodegen extends DefaultCodegen implements CodegenConfig {
protected String invokerPackage = "io.swagger.client"; protected String invokerPackage = "io.swagger.client";
protected String groupId = "io.swagger"; protected String groupId = "org.openapitools";
protected String artifactId = "finch-server"; protected String artifactId = "finch-server";
protected String artifactVersion = "1.0.0"; protected String artifactVersion = "1.0.0";
protected String sourceFolder = "src/main/scala"; protected String sourceFolder = "src/main/scala";
@ -106,10 +106,10 @@ public class FinchServerCodegen extends DefaultCodegen implements CodegenConfig
additionalProperties.put("modelPackage", modelPackage()); additionalProperties.put("modelPackage", modelPackage());
additionalProperties.put("apiPackage", apiPackage()); additionalProperties.put("apiPackage", apiPackage());
additionalProperties.put("appName", "Swagger Sample"); additionalProperties.put("appName", "OpenAPI Sample");
additionalProperties.put("appDescription", "A sample swagger server"); additionalProperties.put("appDescription", "A sample openapi server");
additionalProperties.put("infoUrl", "http://swagger.io"); additionalProperties.put("infoUrl", "http://org.openapitools");
additionalProperties.put("infoEmail", "apiteam@swagger.io"); additionalProperties.put("infoEmail", "team@openapitools.org");
additionalProperties.put("licenseInfo", "Apache 2.0"); additionalProperties.put("licenseInfo", "Apache 2.0");
additionalProperties.put("licenseUrl", "http://apache.org/licenses/LICENSE-2.0.html"); additionalProperties.put("licenseUrl", "http://apache.org/licenses/LICENSE-2.0.html");
additionalProperties.put(CodegenConstants.INVOKER_PACKAGE, invokerPackage); additionalProperties.put(CodegenConstants.INVOKER_PACKAGE, invokerPackage);

View File

@ -17,7 +17,7 @@ public class GoServerCodegen extends AbstractGoCodegen {
protected String apiVersion = "1.0.0"; protected String apiVersion = "1.0.0";
protected int serverPort = 8080; protected int serverPort = 8080;
protected String projectName = "swagger-server"; protected String projectName = "openapi-server";
protected String apiPath = "go"; protected String apiPath = "go";
public GoServerCodegen() { public GoServerCodegen() {

View File

@ -45,7 +45,7 @@ public class JavaCXFClientCodegen extends AbstractJavaCodegen
sourceFolder = "src/gen/java"; sourceFolder = "src/gen/java";
invokerPackage = "org.openapitools.api"; invokerPackage = "org.openapitools.api";
artifactId = "swagger-jaxrs-client"; artifactId = "openapi-jaxrs-client";
dateLibrary = "legacy"; //TODO: add joda support to all jax-rs dateLibrary = "legacy"; //TODO: add joda support to all jax-rs
apiPackage = "org.openapitools.api"; apiPackage = "org.openapitools.api";

View File

@ -1,18 +1,22 @@
package org.openapitools.codegen.languages; package org.openapitools.codegen.languages;
import java.io.File; import io.swagger.v3.oas.models.Operation;
import java.util.List;
import java.util.Map;
import org.slf4j.Logger; import org.openapitools.codegen.CliOption;
import org.slf4j.LoggerFactory; import org.openapitools.codegen.CodegenModel;
import org.openapitools.codegen.CodegenOperation;
import org.openapitools.codegen.*; import org.openapitools.codegen.CodegenProperty;
import org.openapitools.codegen.SupportingFile;
import org.openapitools.codegen.languages.features.CXFServerFeatures; import org.openapitools.codegen.languages.features.CXFServerFeatures;
import org.openapitools.codegen.languages.features.GzipTestFeatures; import org.openapitools.codegen.languages.features.GzipTestFeatures;
import org.openapitools.codegen.languages.features.LoggingTestFeatures; import org.openapitools.codegen.languages.features.LoggingTestFeatures;
import org.openapitools.codegen.languages.features.UseGenericResponseFeatures; import org.openapitools.codegen.languages.features.UseGenericResponseFeatures;
import io.swagger.v3.oas.models.*; import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.File;
import java.util.List;
import java.util.Map;
public class JavaCXFServerCodegen extends AbstractJavaJAXRSServerCodegen public class JavaCXFServerCodegen extends AbstractJavaJAXRSServerCodegen
implements CXFServerFeatures, GzipTestFeatures, LoggingTestFeatures, UseGenericResponseFeatures { implements CXFServerFeatures, GzipTestFeatures, LoggingTestFeatures, UseGenericResponseFeatures {
@ -57,7 +61,7 @@ public class JavaCXFServerCodegen extends AbstractJavaJAXRSServerCodegen
supportsInheritance = true; supportsInheritance = true;
artifactId = "swagger-cxf-server"; artifactId = "openapi-cxf-server";
outputFolder = "generated-code/JavaJaxRS-CXF"; outputFolder = "generated-code/JavaJaxRS-CXF";
@ -167,7 +171,7 @@ public class JavaCXFServerCodegen extends AbstractJavaJAXRSServerCodegen
writeOptional(outputFolder, new SupportingFile("server/pom.mustache", "", "pom.xml")); writeOptional(outputFolder, new SupportingFile("server/pom.mustache", "", "pom.xml"));
writeOptional(outputFolder, writeOptional(outputFolder,
new SupportingFile("server/swagger-codegen-ignore.mustache", "", ".openapi-generator-ignore")); new SupportingFile("server/openapi-generator-ignore.mustache", "", ".openapi-generator-ignore"));
if (this.generateSpringApplication) { if (this.generateSpringApplication) {
writeOptional(outputFolder, new SupportingFile("server/readme.md", "", "readme.md")); writeOptional(outputFolder, new SupportingFile("server/readme.md", "", "readme.md"));

View File

@ -57,7 +57,7 @@ public class JavaClientCodegen extends AbstractJavaCodegen
outputFolder = "generated-code" + File.separator + "java"; outputFolder = "generated-code" + File.separator + "java";
embeddedTemplateDir = templateDir = "Java"; embeddedTemplateDir = templateDir = "Java";
invokerPackage = "io.swagger.client"; invokerPackage = "io.swagger.client";
artifactId = "swagger-java-client"; artifactId = "openapi-java-client";
apiPackage = "io.swagger.client.api"; apiPackage = "io.swagger.client.api";
modelPackage = "io.swagger.client.model"; modelPackage = "io.swagger.client.model";

View File

@ -16,7 +16,7 @@ public class JavaInflectorServerCodegen extends AbstractJavaCodegen {
private static final Logger LOGGER = LoggerFactory.getLogger(JavaInflectorServerCodegen.class); private static final Logger LOGGER = LoggerFactory.getLogger(JavaInflectorServerCodegen.class);
protected String title = "Swagger Inflector"; protected String title = "OpenAPI Inflector";
protected String implFolder = "src/main/java"; protected String implFolder = "src/main/java";
public JavaInflectorServerCodegen() { public JavaInflectorServerCodegen() {
@ -26,7 +26,7 @@ public class JavaInflectorServerCodegen extends AbstractJavaCodegen {
apiTestTemplateFiles.clear(); // TODO: add test template apiTestTemplateFiles.clear(); // TODO: add test template
embeddedTemplateDir = templateDir = "JavaInflector"; embeddedTemplateDir = templateDir = "JavaInflector";
invokerPackage = "io.swagger.controllers"; invokerPackage = "io.swagger.controllers";
artifactId = "swagger-inflector-server"; artifactId = "openapi-inflector-server";
dateLibrary = "legacy"; //TODO: add joda support dateLibrary = "legacy"; //TODO: add joda support
// clear model and api doc template as this codegen // clear model and api doc template as this codegen

View File

@ -24,7 +24,7 @@ public class JavaJAXRSCXFCDIServerCodegen extends JavaJAXRSSpecServerCodegen imp
*/ */
public JavaJAXRSCXFCDIServerCodegen() { public JavaJAXRSCXFCDIServerCodegen() {
outputFolder = "generated-code/JavaJaxRS-CXF-CDI"; outputFolder = "generated-code/JavaJaxRS-CXF-CDI";
artifactId = "swagger-jaxrs-cxf-cdi-server"; artifactId = "openapi-jaxrs-cxf-cdi-server";
sourceFolder = "src" + File.separator + "gen" + File.separator + "java"; sourceFolder = "src" + File.separator + "gen" + File.separator + "java";
// Three API templates to support CDI injection // Three API templates to support CDI injection

View File

@ -29,7 +29,7 @@ public class JavaJAXRSSpecServerCodegen extends AbstractJavaJAXRSServerCodegen {
public JavaJAXRSSpecServerCodegen() { public JavaJAXRSSpecServerCodegen() {
super(); super();
invokerPackage = "io.swagger.api"; invokerPackage = "io.swagger.api";
artifactId = "swagger-jaxrs-server"; artifactId = "openapi-jaxrs-server";
outputFolder = "generated-code/JavaJaxRS-Spec"; outputFolder = "generated-code/JavaJaxRS-Spec";
modelTemplateFiles.put("model.mustache", ".java"); modelTemplateFiles.put("model.mustache", ".java");
@ -94,7 +94,7 @@ public class JavaJAXRSSpecServerCodegen extends AbstractJavaJAXRSServerCodegen {
} }
if (interfaceOnly) { if (interfaceOnly) {
// Change default artifactId if genereating interfaces only, before command line options are applied in base class. // Change default artifactId if genereating interfaces only, before command line options are applied in base class.
artifactId = "swagger-jaxrs-client"; artifactId = "openapi-jaxrs-client";
} }
super.processOpts(); super.processOpts();

View File

@ -26,7 +26,7 @@ public class JavaPlayFrameworkCodegen extends AbstractJavaCodegen implements Bea
public static final String WRAP_CALLS = "wrapCalls"; public static final String WRAP_CALLS = "wrapCalls";
public static final String USE_SWAGGER_UI = "useSwaggerUI"; public static final String USE_SWAGGER_UI = "useSwaggerUI";
protected String title = "swagger-petstore"; protected String title = "openapi-java-playframework";
protected String configPackage = "io.swagger.configuration"; protected String configPackage = "io.swagger.configuration";
protected String basePackage = "io.swagger"; protected String basePackage = "io.swagger";
protected boolean controllerOnly = false; protected boolean controllerOnly = false;
@ -44,7 +44,7 @@ public class JavaPlayFrameworkCodegen extends AbstractJavaCodegen implements Bea
apiPackage = "controllers"; apiPackage = "controllers";
modelPackage = "apimodels"; modelPackage = "apimodels";
invokerPackage = "io.swagger.api"; invokerPackage = "io.swagger.api";
artifactId = "swagger-java-playframework"; artifactId = "openapi-java-playframework";
projectFolder = ""; projectFolder = "";
sourceFolder = projectFolder + File.separator + "app"; sourceFolder = projectFolder + File.separator + "app";

View File

@ -25,7 +25,7 @@ public class JavaResteasyEapServerCodegen extends AbstractJavaJAXRSServerCodegen
super(); super();
artifactId = "swagger-jaxrs-resteasy-eap-server"; artifactId = "openapi-jaxrs-resteasy-eap-server";
outputFolder = "generated-code/JavaJaxRS-Resteasy-eap"; outputFolder = "generated-code/JavaJaxRS-Resteasy-eap";
apiTemplateFiles.put("apiServiceImpl.mustache", ".java"); apiTemplateFiles.put("apiServiceImpl.mustache", ".java");

View File

@ -18,7 +18,7 @@ public class JavaResteasyServerCodegen extends AbstractJavaJAXRSServerCodegen im
super(); super();
artifactId = "swagger-jaxrs-resteasy-server"; artifactId = "openapi-jaxrs-resteasy-server";
outputFolder = "generated-code/JavaJaxRS-Resteasy"; outputFolder = "generated-code/JavaJaxRS-Resteasy";
apiTemplateFiles.put("apiService.mustache", ".java"); apiTemplateFiles.put("apiService.mustache", ".java");

View File

@ -22,7 +22,7 @@ public class JavaUndertowServerCodegen extends AbstractJavaCodegen {
apiTestTemplateFiles.clear(); // TODO: add test template apiTestTemplateFiles.clear(); // TODO: add test template
embeddedTemplateDir = templateDir = "undertow"; embeddedTemplateDir = templateDir = "undertow";
invokerPackage = "io.swagger.handler"; invokerPackage = "io.swagger.handler";
artifactId = "swagger-undertow-server"; artifactId = "openapi-undertow-server";
dateLibrary = "legacy"; //TODO: add joda support dateLibrary = "legacy"; //TODO: add joda support
// clear model and api doc template as this codegen // clear model and api doc template as this codegen

View File

@ -63,8 +63,8 @@ public class JavaVertXServerCodegen extends AbstractJavaCodegen {
additionalProperties.put(ROOT_PACKAGE, rootPackage); additionalProperties.put(ROOT_PACKAGE, rootPackage);
groupId = "io.swagger"; groupId = "org.openapitools";
artifactId = "swagger-java-vertx-server"; artifactId = "openapi-java-vertx-server";
artifactVersion = apiVersion; artifactVersion = apiVersion;
this.setDateLibrary("java8"); this.setDateLibrary("java8");

View File

@ -284,7 +284,7 @@ public class JavascriptClientCodegen extends DefaultCodegen implements CodegenCo
// default values // default values
if (StringUtils.isBlank(projectName)) { if (StringUtils.isBlank(projectName)) {
projectName = "swagger-js-client"; projectName = "openapi-js-client";
} }
if (StringUtils.isBlank(moduleName)) { if (StringUtils.isBlank(moduleName)) {
moduleName = camelize(underscore(projectName)); moduleName = camelize(underscore(projectName));

View File

@ -31,7 +31,7 @@ public class NodeJSServerCodegen extends DefaultCodegen implements CodegenConfig
public static final String SERVER_PORT = "serverPort"; public static final String SERVER_PORT = "serverPort";
protected String apiVersion = "1.0.0"; protected String apiVersion = "1.0.0";
protected String projectName = "swagger-server"; protected String projectName = "openapi-server";
protected String defaultServerPort = "8080"; protected String defaultServerPort = "8080";
protected boolean googleCloudFunctions; protected boolean googleCloudFunctions;

View File

@ -41,9 +41,9 @@ public class ObjcClientCodegen extends DefaultCodegen implements CodegenConfig {
protected String podVersion = "1.0.0"; protected String podVersion = "1.0.0";
protected String classPrefix = "SWG"; protected String classPrefix = "SWG";
protected String authorName = "Swagger"; protected String authorName = "Swagger";
protected String authorEmail = "apiteam@swagger.io"; protected String authorEmail = "team@openapitools.org";
protected String license = DEFAULT_LICENSE; protected String license = DEFAULT_LICENSE;
protected String gitRepoURL = "https://github.com/swagger-api/swagger-codegen"; protected String gitRepoURL = "https://github.com/openapitools/openapi-generator";
protected String[] specialWords = {"new", "copy"}; protected String[] specialWords = {"new", "copy"};
protected String apiDocPath = "docs/"; protected String apiDocPath = "docs/";
protected String modelDocPath = "docs/"; protected String modelDocPath = "docs/";
@ -178,9 +178,9 @@ public class ObjcClientCodegen extends DefaultCodegen implements CodegenConfig {
cliOptions.add(new CliOption(CodegenConstants.POD_VERSION, "cocoapods package version.") cliOptions.add(new CliOption(CodegenConstants.POD_VERSION, "cocoapods package version.")
.defaultValue("1.0.0")); .defaultValue("1.0.0"));
cliOptions.add(new CliOption(AUTHOR_NAME, "Name to use in the podspec file.").defaultValue("Swagger")); cliOptions.add(new CliOption(AUTHOR_NAME, "Name to use in the podspec file.").defaultValue("Swagger"));
cliOptions.add(new CliOption(AUTHOR_EMAIL, "Email to use in the podspec file.").defaultValue("apiteam@swagger.io")); cliOptions.add(new CliOption(AUTHOR_EMAIL, "Email to use in the podspec file.").defaultValue("team@openapitools.org"));
cliOptions.add(new CliOption(GIT_REPO_URL, "URL for the git repo where this podspec should point to.") cliOptions.add(new CliOption(GIT_REPO_URL, "URL for the git repo where this podspec should point to.")
.defaultValue("https://github.com/swagger-api/swagger-codegen")); .defaultValue("https://github.com/openapitools/openapi-generator"));
cliOptions.add(new CliOption(CodegenConstants.HIDE_GENERATION_TIMESTAMP, CodegenConstants.HIDE_GENERATION_TIMESTAMP_DESC) cliOptions.add(new CliOption(CodegenConstants.HIDE_GENERATION_TIMESTAMP, CodegenConstants.HIDE_GENERATION_TIMESTAMP_DESC)
.defaultValue(Boolean.TRUE.toString())); .defaultValue(Boolean.TRUE.toString()));
} }

View File

@ -143,9 +143,9 @@ public class PhpClientCodegen extends DefaultCodegen implements CodegenConfig {
cliOptions.add(new CliOption(CodegenConstants.INVOKER_PACKAGE, "The main namespace to use for all classes. e.g. Yay\\Pets")); cliOptions.add(new CliOption(CodegenConstants.INVOKER_PACKAGE, "The main namespace to use for all classes. e.g. Yay\\Pets"));
cliOptions.add(new CliOption(PACKAGE_PATH, "The main package name for classes. e.g. GeneratedPetstore")); cliOptions.add(new CliOption(PACKAGE_PATH, "The main package name for classes. e.g. GeneratedPetstore"));
cliOptions.add(new CliOption(SRC_BASE_PATH, "The directory under packagePath to serve as source root.")); cliOptions.add(new CliOption(SRC_BASE_PATH, "The directory under packagePath to serve as source root."));
cliOptions.add(new CliOption(COMPOSER_VENDOR_NAME, "The vendor name used in the composer package name. The template uses {{composerVendorName}}/{{composerProjectName}} for the composer package name. e.g. yaypets. IMPORTANT NOTE (2016/03): composerVendorName will be deprecated and replaced by gitUserId in the next swagger-codegen release")); cliOptions.add(new CliOption(COMPOSER_VENDOR_NAME, "The vendor name used in the composer package name. The template uses {{composerVendorName}}/{{composerProjectName}} for the composer package name. e.g. yaypets. IMPORTANT NOTE (2016/03): composerVendorName will be deprecated and replaced by gitUserId in the next openapi-generator release"));
cliOptions.add(new CliOption(CodegenConstants.GIT_USER_ID, CodegenConstants.GIT_USER_ID_DESC)); cliOptions.add(new CliOption(CodegenConstants.GIT_USER_ID, CodegenConstants.GIT_USER_ID_DESC));
cliOptions.add(new CliOption(COMPOSER_PROJECT_NAME, "The project name used in the composer package name. The template uses {{composerVendorName}}/{{composerProjectName}} for the composer package name. e.g. petstore-client. IMPORTANT NOTE (2016/03): composerProjectName will be deprecated and replaced by gitRepoId in the next swagger-codegen release")); cliOptions.add(new CliOption(COMPOSER_PROJECT_NAME, "The project name used in the composer package name. The template uses {{composerVendorName}}/{{composerProjectName}} for the composer package name. e.g. petstore-client. IMPORTANT NOTE (2016/03): composerProjectName will be deprecated and replaced by gitRepoId in the next openapi-generator release"));
cliOptions.add(new CliOption(CodegenConstants.GIT_REPO_ID, CodegenConstants.GIT_REPO_ID_DESC)); cliOptions.add(new CliOption(CodegenConstants.GIT_REPO_ID, CodegenConstants.GIT_REPO_ID_DESC));
cliOptions.add(new CliOption(CodegenConstants.ARTIFACT_VERSION, "The version to use in the composer package version field. e.g. 1.2.3")); cliOptions.add(new CliOption(CodegenConstants.ARTIFACT_VERSION, "The version to use in the composer package version field. e.g. 1.2.3"));
cliOptions.add(new CliOption(CodegenConstants.HIDE_GENERATION_TIMESTAMP, CodegenConstants.ALLOW_UNICODE_IDENTIFIERS_DESC) cliOptions.add(new CliOption(CodegenConstants.HIDE_GENERATION_TIMESTAMP, CodegenConstants.ALLOW_UNICODE_IDENTIFIERS_DESC)

View File

@ -23,8 +23,8 @@ import org.apache.commons.lang3.StringUtils;
public class PhpSilexServerCodegen extends DefaultCodegen implements CodegenConfig { public class PhpSilexServerCodegen extends DefaultCodegen implements CodegenConfig {
protected String invokerPackage; protected String invokerPackage;
protected String groupId = "io.swagger"; protected String groupId = "org.openapitools";
protected String artifactId = "swagger-server"; protected String artifactId = "openapi-server";
protected String artifactVersion = "1.0.0"; protected String artifactVersion = "1.0.0";
public PhpSilexServerCodegen() { public PhpSilexServerCodegen() {

View File

@ -22,8 +22,8 @@ import java.util.regex.Matcher;
public class PhpSlimServerCodegen extends DefaultCodegen implements CodegenConfig { public class PhpSlimServerCodegen extends DefaultCodegen implements CodegenConfig {
protected String invokerPackage; protected String invokerPackage;
protected String srcBasePath = "lib"; protected String srcBasePath = "lib";
protected String groupId = "io.swagger"; protected String groupId = "org.openapitools";
protected String artifactId = "swagger-server"; protected String artifactId = "openapi-server";
protected String artifactVersion = "1.0.0"; protected String artifactVersion = "1.0.0";
protected String packagePath = ""; // empty packagePath (top folder) protected String packagePath = ""; // empty packagePath (top folder)

View File

@ -153,9 +153,9 @@ public class PhpSymfonyServerCodegen extends AbstractPhpCodegen implements Codeg
typeMapping.put("ByteArray", "string"); typeMapping.put("ByteArray", "string");
typeMapping.put("UUID", "string"); typeMapping.put("UUID", "string");
cliOptions.add(new CliOption(COMPOSER_VENDOR_NAME, "The vendor name used in the composer package name. The template uses {{composerVendorName}}/{{composerProjectName}} for the composer package name. e.g. yaypets. IMPORTANT NOTE (2016/03): composerVendorName will be deprecated and replaced by gitUserId in the next swagger-codegen release")); cliOptions.add(new CliOption(COMPOSER_VENDOR_NAME, "The vendor name used in the composer package name. The template uses {{composerVendorName}}/{{composerProjectName}} for the composer package name. e.g. yaypets. IMPORTANT NOTE (2016/03): composerVendorName will be deprecated and replaced by gitUserId in the next openapi-generator release"));
cliOptions.add(new CliOption(BUNDLE_NAME, "The name of the Symfony bundle. The template uses {{bundleName}}")); cliOptions.add(new CliOption(BUNDLE_NAME, "The name of the Symfony bundle. The template uses {{bundleName}}"));
cliOptions.add(new CliOption(COMPOSER_PROJECT_NAME, "The project name used in the composer package name. The template uses {{composerVendorName}}/{{composerProjectName}} for the composer package name. e.g. petstore-client. IMPORTANT NOTE (2016/03): composerProjectName will be deprecated and replaced by gitRepoId in the next swagger-codegen release")); cliOptions.add(new CliOption(COMPOSER_PROJECT_NAME, "The project name used in the composer package name. The template uses {{composerVendorName}}/{{composerProjectName}} for the composer package name. e.g. petstore-client. IMPORTANT NOTE (2016/03): composerProjectName will be deprecated and replaced by gitRepoId in the next openapi-generator release"));
cliOptions.add(new CliOption(CodegenConstants.HIDE_GENERATION_TIMESTAMP, CodegenConstants.HIDE_GENERATION_TIMESTAMP_DESC) cliOptions.add(new CliOption(CodegenConstants.HIDE_GENERATION_TIMESTAMP, CodegenConstants.HIDE_GENERATION_TIMESTAMP_DESC)
.defaultValue(Boolean.TRUE.toString())); .defaultValue(Boolean.TRUE.toString()));
cliOptions.add(new CliOption(PHP_LEGACY_SUPPORT, "Should the generated code be compatible with PHP 5.x?").defaultValue(Boolean.TRUE.toString())); cliOptions.add(new CliOption(PHP_LEGACY_SUPPORT, "Should the generated code be compatible with PHP 5.x?").defaultValue(Boolean.TRUE.toString()));

View File

@ -44,7 +44,7 @@ public class RubyClientCodegen extends DefaultCodegen implements CodegenConfig {
protected String libFolder = "lib"; protected String libFolder = "lib";
protected String gemLicense = "proprietary"; protected String gemLicense = "proprietary";
protected String gemRequiredRubyVersion = ">= 1.9"; protected String gemRequiredRubyVersion = ">= 1.9";
protected String gemHomepage = "http://swagger.io"; protected String gemHomepage = "http://org.openapitools";
protected String gemSummary = "A ruby wrapper for the swagger APIs"; protected String gemSummary = "A ruby wrapper for the swagger APIs";
protected String gemDescription = "This gem maps to a swagger API"; protected String gemDescription = "This gem maps to a swagger API";
protected String gemAuthor = ""; protected String gemAuthor = "";
@ -152,7 +152,7 @@ public class RubyClientCodegen extends DefaultCodegen implements CodegenConfig {
defaultValue(">= 1.9")); defaultValue(">= 1.9"));
cliOptions.add(new CliOption(GEM_HOMEPAGE, "gem homepage. "). cliOptions.add(new CliOption(GEM_HOMEPAGE, "gem homepage. ").
defaultValue("http://swagger.io")); defaultValue("http://org.openapitools"));
cliOptions.add(new CliOption(GEM_SUMMARY, "gem summary. "). cliOptions.add(new CliOption(GEM_SUMMARY, "gem summary. ").
defaultValue("A ruby wrapper for the swagger APIs")); defaultValue("A ruby wrapper for the swagger APIs"));

View File

@ -28,7 +28,7 @@ public class RustServerCodegen extends DefaultCodegen implements CodegenConfig {
protected String apiVersion = "1.0.0"; protected String apiVersion = "1.0.0";
protected String serverHost = "localhost"; protected String serverHost = "localhost";
protected int serverPort = 8080; protected int serverPort = 8080;
protected String projectName = "swagger-server"; protected String projectName = "openapi-server";
protected String apiPath = "rust-server"; protected String apiPath = "rust-server";
protected String packageName; protected String packageName;
protected String packageVersion; protected String packageVersion;

View File

@ -4,8 +4,11 @@ import com.google.common.base.CaseFormat;
import com.samskivert.mustache.Mustache; import com.samskivert.mustache.Mustache;
import com.samskivert.mustache.Template; import com.samskivert.mustache.Template;
import io.swagger.v3.oas.models.media.ArraySchema;
import io.swagger.v3.oas.models.media.Schema;
import io.swagger.v3.oas.models.security.SecurityScheme; import io.swagger.v3.oas.models.security.SecurityScheme;
import org.openapitools.codegen.CliOption;
import org.apache.commons.lang3.StringUtils;
import org.openapitools.codegen.CodegenConfig; import org.openapitools.codegen.CodegenConfig;
import org.openapitools.codegen.CodegenConstants; import org.openapitools.codegen.CodegenConstants;
import org.openapitools.codegen.CodegenOperation; import org.openapitools.codegen.CodegenOperation;
@ -15,11 +18,6 @@ import org.openapitools.codegen.CodegenSecurity;
import org.openapitools.codegen.CodegenType; import org.openapitools.codegen.CodegenType;
import org.openapitools.codegen.SupportingFile; import org.openapitools.codegen.SupportingFile;
import org.openapitools.codegen.utils.ModelUtils; import org.openapitools.codegen.utils.ModelUtils;
import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.Operation;
import io.swagger.v3.oas.models.media.*;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
@ -38,7 +36,7 @@ import java.util.Map;
public class ScalaAkkaClientCodegen extends AbstractScalaCodegen implements CodegenConfig { public class ScalaAkkaClientCodegen extends AbstractScalaCodegen implements CodegenConfig {
protected String mainPackage = "io.swagger.client"; protected String mainPackage = "io.swagger.client";
protected String groupId = "io.swagger"; protected String groupId = "io.swagger";
protected String artifactId = "swagger-client"; protected String artifactId = "openapi-client";
protected String artifactVersion = "1.0.0"; protected String artifactVersion = "1.0.0";
protected String resourcesFolder = "src/main/resources"; protected String resourcesFolder = "src/main/resources";
protected String configKey = "apiRequest"; protected String configKey = "apiRequest";

View File

@ -1,20 +1,24 @@
package org.openapitools.codegen.languages; package org.openapitools.codegen.languages;
import org.openapitools.codegen.*; import org.apache.commons.lang3.StringUtils;
import org.openapitools.codegen.CliOption;
import org.openapitools.codegen.CodegenConfig;
import org.openapitools.codegen.CodegenConstants;
import org.openapitools.codegen.CodegenProperty;
import org.openapitools.codegen.CodegenType;
import org.openapitools.codegen.SupportingFile;
import java.io.File; import java.io.File;
import java.util.Arrays; import java.util.Arrays;
import java.util.HashMap; import java.util.HashMap;
import org.apache.commons.lang3.StringUtils;
public class ScalaHttpClientCodegen extends AbstractScalaCodegen implements CodegenConfig { public class ScalaHttpClientCodegen extends AbstractScalaCodegen implements CodegenConfig {
protected String authScheme = ""; protected String authScheme = "";
protected String gradleWrapperPackage = "gradle.wrapper"; protected String gradleWrapperPackage = "gradle.wrapper";
protected boolean authPreemptive; protected boolean authPreemptive;
protected boolean asyncHttpClient = !authScheme.isEmpty(); protected boolean asyncHttpClient = !authScheme.isEmpty();
protected String groupId = "io.swagger"; protected String groupId = "io.swagger";
protected String artifactId = "swagger-scala-client"; protected String artifactId = "openapi-scala-client";
protected String artifactVersion = "1.0.0"; protected String artifactVersion = "1.0.0";
protected String clientName = "AsyncClient"; protected String clientName = "AsyncClient";

View File

@ -9,7 +9,7 @@ public class ScalaLagomServerCodegen extends AbstractScalaCodegen implements Cod
private String authScheme = ""; private String authScheme = "";
private boolean authPreemptive = false; private boolean authPreemptive = false;
protected String groupId = "io.swagger"; protected String groupId = "org.openapitools";
protected String artifactId = "scala-lagom-server"; protected String artifactId = "scala-lagom-server";
protected String artifactVersion = "1.0.0"; protected String artifactVersion = "1.0.0";

View File

@ -17,8 +17,8 @@ import java.util.Map;
public class ScalatraServerCodegen extends AbstractScalaCodegen implements CodegenConfig { public class ScalatraServerCodegen extends AbstractScalaCodegen implements CodegenConfig {
protected String groupId = "io.swagger"; protected String groupId = "org.openapitools";
protected String artifactId = "swagger-server"; protected String artifactId = "openapi-server";
protected String artifactVersion = "1.0.0"; protected String artifactVersion = "1.0.0";
public ScalatraServerCodegen() { public ScalatraServerCodegen() {
@ -67,10 +67,10 @@ public class ScalatraServerCodegen extends AbstractScalaCodegen implements Codeg
// mapped to String as a workaround // mapped to String as a workaround
typeMapping.put("binary", "String"); typeMapping.put("binary", "String");
additionalProperties.put("appName", "Swagger Sample"); additionalProperties.put("appName", "OpenAPI Sample");
additionalProperties.put("appDescription", "A sample swagger server"); additionalProperties.put("appDescription", "A sample openapi server");
additionalProperties.put("infoUrl", "http://swagger.io"); additionalProperties.put("infoUrl", "http://org.openapitools");
additionalProperties.put("infoEmail", "apiteam@swagger.io"); additionalProperties.put("infoEmail", "team@openapitools.org");
additionalProperties.put("licenseInfo", "All rights reserved"); additionalProperties.put("licenseInfo", "All rights reserved");
additionalProperties.put("licenseUrl", "http://apache.org/licenses/LICENSE-2.0.html"); additionalProperties.put("licenseUrl", "http://apache.org/licenses/LICENSE-2.0.html");
additionalProperties.put(CodegenConstants.INVOKER_PACKAGE, invokerPackage); additionalProperties.put(CodegenConstants.INVOKER_PACKAGE, invokerPackage);

View File

@ -34,7 +34,7 @@ public class SpringCodegen extends AbstractJavaCodegen
public static final String IMPLICIT_HEADERS = "implicitHeaders"; public static final String IMPLICIT_HEADERS = "implicitHeaders";
public static final String SWAGGER_DOCKET_CONFIG = "swaggerDocketConfig"; public static final String SWAGGER_DOCKET_CONFIG = "swaggerDocketConfig";
protected String title = "swagger-petstore"; protected String title = "OpenAPI Spring";
protected String configPackage = "io.swagger.configuration"; protected String configPackage = "io.swagger.configuration";
protected String basePackage = "io.swagger"; protected String basePackage = "io.swagger";
protected boolean interfaceOnly = false; protected boolean interfaceOnly = false;
@ -58,7 +58,7 @@ public class SpringCodegen extends AbstractJavaCodegen
apiPackage = "io.swagger.api"; apiPackage = "io.swagger.api";
modelPackage = "io.swagger.model"; modelPackage = "io.swagger.model";
invokerPackage = "io.swagger.api"; invokerPackage = "io.swagger.api";
artifactId = "swagger-spring"; artifactId = "openapi-spring";
additionalProperties.put(CONFIG_PACKAGE, configPackage); additionalProperties.put(CONFIG_PACKAGE, configPackage);
additionalProperties.put(BASE_PACKAGE, basePackage); additionalProperties.put(BASE_PACKAGE, basePackage);

View File

@ -11,8 +11,8 @@ import java.io.File;
public class StaticDocCodegen extends DefaultCodegen implements CodegenConfig { public class StaticDocCodegen extends DefaultCodegen implements CodegenConfig {
protected String invokerPackage = "io.swagger.client"; protected String invokerPackage = "io.swagger.client";
protected String groupId = "io.swagger"; protected String groupId = "org.openapitools";
protected String artifactId = "swagger-client"; protected String artifactId = "openapi-client";
protected String artifactVersion = "1.0.0"; protected String artifactVersion = "1.0.0";
protected String sourceFolder = "docs"; protected String sourceFolder = "docs";

View File

@ -31,8 +31,8 @@ public class StaticHtml2Generator extends DefaultCodegen implements CodegenConfi
protected String invokerPackage = "io.swagger.client"; // default for Java and Android protected String invokerPackage = "io.swagger.client"; // default for Java and Android
protected String phpInvokerPackage = "Swagger\\Client"; // default for PHP protected String phpInvokerPackage = "Swagger\\Client"; // default for PHP
protected String packageName = "IO.Swagger"; // default for C# protected String packageName = "IO.Swagger"; // default for C#
protected String groupId = "io.swagger"; protected String groupId = "org.openapitools";
protected String artifactId = "swagger-client"; protected String artifactId = "openapi-client";
protected String artifactVersion = "1.0.0"; protected String artifactVersion = "1.0.0";
protected String jsProjectName; protected String jsProjectName;
protected String jsModuleName; protected String jsModuleName;
@ -61,8 +61,8 @@ public class StaticHtml2Generator extends DefaultCodegen implements CodegenConfi
cliOptions.add(new CliOption(CodegenConstants.ARTIFACT_ID, CodegenConstants.ARTIFACT_ID_DESC)); cliOptions.add(new CliOption(CodegenConstants.ARTIFACT_ID, CodegenConstants.ARTIFACT_ID_DESC));
cliOptions.add(new CliOption(CodegenConstants.ARTIFACT_VERSION, CodegenConstants.ARTIFACT_VERSION_DESC)); cliOptions.add(new CliOption(CodegenConstants.ARTIFACT_VERSION, CodegenConstants.ARTIFACT_VERSION_DESC));
additionalProperties.put("appName", "Swagger Sample"); additionalProperties.put("appName", "OpenAPI Sample");
additionalProperties.put("appDescription", "A sample swagger server"); additionalProperties.put("appDescription", "A sample openapi server");
additionalProperties.put("infoUrl", "https://helloreverb.com"); additionalProperties.put("infoUrl", "https://helloreverb.com");
additionalProperties.put("infoEmail", "hello@helloreverb.com"); additionalProperties.put("infoEmail", "hello@helloreverb.com");
additionalProperties.put("licenseInfo", "All rights reserved"); additionalProperties.put("licenseInfo", "All rights reserved");

View File

@ -29,8 +29,8 @@ import com.samskivert.mustache.Mustache.Compiler;
public class StaticHtmlGenerator extends DefaultCodegen implements CodegenConfig { public class StaticHtmlGenerator extends DefaultCodegen implements CodegenConfig {
protected String invokerPackage = "io.swagger.client"; protected String invokerPackage = "io.swagger.client";
protected String groupId = "io.swagger"; protected String groupId = "org.openapitools";
protected String artifactId = "swagger-client"; protected String artifactId = "openapi-client";
protected String artifactVersion = "1.0.0"; protected String artifactVersion = "1.0.0";
public StaticHtmlGenerator() { public StaticHtmlGenerator() {
@ -51,8 +51,8 @@ public class StaticHtmlGenerator extends DefaultCodegen implements CodegenConfig
cliOptions.add(new CliOption(CodegenConstants.ARTIFACT_ID, CodegenConstants.ARTIFACT_ID_DESC)); cliOptions.add(new CliOption(CodegenConstants.ARTIFACT_ID, CodegenConstants.ARTIFACT_ID_DESC));
cliOptions.add(new CliOption(CodegenConstants.ARTIFACT_VERSION, CodegenConstants.ARTIFACT_VERSION_DESC)); cliOptions.add(new CliOption(CodegenConstants.ARTIFACT_VERSION, CodegenConstants.ARTIFACT_VERSION_DESC));
additionalProperties.put("appName", "Swagger Sample"); additionalProperties.put("appName", "OpenAPI Sample");
additionalProperties.put("appDescription", "A sample swagger server"); additionalProperties.put("appDescription", "A sample openapi server");
additionalProperties.put("infoUrl", "https://helloreverb.com"); additionalProperties.put("infoUrl", "https://helloreverb.com");
additionalProperties.put("infoEmail", "hello@helloreverb.com"); additionalProperties.put("infoEmail", "hello@helloreverb.com");
additionalProperties.put("licenseInfo", "All rights reserved"); additionalProperties.put("licenseInfo", "All rights reserved");

View File

@ -46,7 +46,7 @@ public class Swift3Codegen extends DefaultCodegen implements CodegenConfig {
protected static final String LIBRARY_PROMISE_KIT = "PromiseKit"; protected static final String LIBRARY_PROMISE_KIT = "PromiseKit";
protected static final String LIBRARY_RX_SWIFT = "RxSwift"; protected static final String LIBRARY_RX_SWIFT = "RxSwift";
protected static final String[] RESPONSE_LIBRARIES = {LIBRARY_PROMISE_KIT, LIBRARY_RX_SWIFT}; protected static final String[] RESPONSE_LIBRARIES = {LIBRARY_PROMISE_KIT, LIBRARY_RX_SWIFT};
protected String projectName = "SwaggerClient"; protected String projectName = "OpenAPIClient";
protected boolean unwrapRequired; protected boolean unwrapRequired;
protected boolean objcCompatible = false; protected boolean objcCompatible = false;
protected boolean lenientTypeCast = false; protected boolean lenientTypeCast = false;

View File

@ -53,7 +53,7 @@ public class Swift4Codegen extends DefaultCodegen implements CodegenConfig {
protected static final String LIBRARY_PROMISE_KIT = "PromiseKit"; protected static final String LIBRARY_PROMISE_KIT = "PromiseKit";
protected static final String LIBRARY_RX_SWIFT = "RxSwift"; protected static final String LIBRARY_RX_SWIFT = "RxSwift";
protected static final String[] RESPONSE_LIBRARIES = {LIBRARY_PROMISE_KIT, LIBRARY_RX_SWIFT}; protected static final String[] RESPONSE_LIBRARIES = {LIBRARY_PROMISE_KIT, LIBRARY_RX_SWIFT};
protected String projectName = "SwaggerClient"; protected String projectName = "OpenAPIClient";
protected boolean unwrapRequired; protected boolean unwrapRequired;
protected boolean objcCompatible = false; protected boolean objcCompatible = false;
protected boolean lenientTypeCast = false; protected boolean lenientTypeCast = false;

View File

@ -49,7 +49,7 @@ public class SwiftClientCodegen extends DefaultCodegen implements CodegenConfig
protected static final String LIBRARY_PROMISE_KIT = "PromiseKit"; protected static final String LIBRARY_PROMISE_KIT = "PromiseKit";
protected static final String LIBRARY_RX_SWIFT = "RxSwift"; protected static final String LIBRARY_RX_SWIFT = "RxSwift";
protected static final String[] RESPONSE_LIBRARIES = { LIBRARY_PROMISE_KIT, LIBRARY_RX_SWIFT }; protected static final String[] RESPONSE_LIBRARIES = { LIBRARY_PROMISE_KIT, LIBRARY_RX_SWIFT };
protected String projectName = "SwaggerClient"; protected String projectName = "OpenAPIClient";
protected boolean unwrapRequired; protected boolean unwrapRequired;
protected boolean swiftUseApiNamespace; protected boolean swiftUseApiNamespace;
protected String[] responseAs = new String[0]; protected String[] responseAs = new String[0];

View File

@ -1,11 +1,11 @@
# Swagger Codegen Ignore # OpenAPI Generator Ignore
# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen # Generated by openapi-generator https://github.com/openapitools/openapi-generator
# Use this file to prevent files from being overwritten by the generator. # Use this file to prevent files from being overwritten by the generator.
# The patterns follow closely to .gitignore or .dockerignore. # The patterns follow closely to .gitignore or .dockerignore.
# As an example, the C# client generator defines ApiClient.cs. # As an example, the C# client generator defines ApiClient.cs.
# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line: # You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
#ApiClient.cs #ApiClient.cs
# You can match any string of characters against a directory, file or extension with a single asterisk (*): # You can match any string of characters against a directory, file or extension with a single asterisk (*):

View File

@ -1,11 +1,11 @@
# Openapi Generator Ignore # OpenAPI Generator Ignore
# Generated by openapi-generator https://github.com/openapitools/openapi-generator # Generated by openapi-generator https://github.com/openapitools/openapi-generator
# Use this file to prevent files from being overwritten by the generator. # Use this file to prevent files from being overwritten by the generator.
# The patterns follow closely to .gitignore or .dockerignore. # The patterns follow closely to .gitignore or .dockerignore.
# As an example, the C# client generator defines ApiClient.cs. # As an example, the C# client generator defines ApiClient.cs.
# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line: # You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
#ApiClient.cs #ApiClient.cs
# You can match any string of characters against a directory, file or extension with a single asterisk (*): # You can match any string of characters against a directory, file or extension with a single asterisk (*):

View File

@ -13,8 +13,8 @@ public class ObjcClientOptionsProvider implements OptionsProvider {
public static final String POD_NAME_VALUE = "SwaggerClientObjc"; public static final String POD_NAME_VALUE = "SwaggerClientObjc";
public static final String POD_VERSION_VALUE = "1.0.0-SNAPSHOT"; public static final String POD_VERSION_VALUE = "1.0.0-SNAPSHOT";
public static final String AUTHOR_NAME_VALUE = "SwaggerObjc"; public static final String AUTHOR_NAME_VALUE = "SwaggerObjc";
public static final String AUTHOR_EMAIL_VALUE = "objc@swagger.io"; public static final String AUTHOR_EMAIL_VALUE = "objc@openapitools.org";
public static final String GIT_REPO_URL_VALUE = "https://github.com/swagger-api/swagger-codegen"; public static final String GIT_REPO_URL_VALUE = "https://github.com/openapitools/openapi-generator";
@Override @Override
public String getLanguage() { public String getLanguage() {

View File

@ -1 +0,0 @@
3.0.0-SNAPSHOT