From 3245c0a139bd0b6df24bd805b10d23936d6808b9 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Wed, 8 Aug 2018 11:21:34 +0800 Subject: [PATCH 01/27] minor update to python generator usage (#762) --- .../org/openapitools/codegen/languages/PythonClientCodegen.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java index 0789d6260d57..eed683f061c4 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java @@ -165,7 +165,7 @@ public class PythonClientCodegen extends DefaultCodegen implements CodegenConfig supportedLibraries.put("urllib3", "urllib3-based client"); supportedLibraries.put("asyncio", "Asyncio-based client (python 3.5+)"); supportedLibraries.put("tornado", "tornado-based client"); - CliOption libraryOption = new CliOption(CodegenConstants.LIBRARY, "library template (sub-template) to use"); + CliOption libraryOption = new CliOption(CodegenConstants.LIBRARY, "library template (sub-template) to use: asyncio, tornado, urllib3"); libraryOption.setDefault(DEFAULT_LIBRARY); cliOptions.add(libraryOption); setLibrary(DEFAULT_LIBRARY); From 06263d76064040118e5dffef67660901890aea7b Mon Sep 17 00:00:00 2001 From: William Cheng Date: Wed, 8 Aug 2018 11:50:33 +0800 Subject: [PATCH 02/27] [JAX-RS][Spec] Add samples to CircleCI (#759) * test jaxrs spec server petstore in circleci * remove duplicated entries in pom * trigger build failure * Revert "trigger build failure" This reverts commit 35ac96ed4abc54bd605cd5a95bc9280dc032b147. --- CI/pom.xml.circleci | 40 ++++++++++++++++++++++++++++++++++++++- CI/pom.xml.circleci.java7 | 40 ++++++++++++++++++++++++++++++++++++++- 2 files changed, 78 insertions(+), 2 deletions(-) diff --git a/CI/pom.xml.circleci b/CI/pom.xml.circleci index dc0b392e186f..b5dd34e4c9c3 100644 --- a/CI/pom.xml.circleci +++ b/CI/pom.xml.circleci @@ -607,6 +607,42 @@ samples/server/petstore/jaxrs/jersey1 + + jaxrs-spec + + + env + java + + + + samples/server/petstore/jaxrs-spec + + + + jaxrs-spec-interface + + + env + java + + + + samples/server/petstore/jaxrs-spec-interface + + + + jaxrs-spec-interface-response + + + env + java + + + + samples/server/petstore/jaxrs-spec-interface-response + + typescript-fetch-client-tests-default @@ -862,6 +898,9 @@ samples/client/petstore/kotlin-threetenbp/ samples/client/petstore/kotlin-string/ + samples/server/petstore/jaxrs-spec + samples/server/petstore/jaxrs-spec-interface + samples/server/petstore/jaxrs-spec-interface-response samples/server/petstore/java-vertx/rx samples/server/petstore/java-vertx/async samples/server/petstore/java-inflector @@ -901,7 +940,6 @@ samples/server/petstore/jaxrs-cxf-cdi samples/server/petstore/jaxrs-cxf-non-spring-app samples/server/petstore/java-msf4j - samples/server/petstore/jaxrs-spec-interface samples/server/petstore/scala-lagom-server samples/server/petstore/scalatra samples/server/petstore/finch diff --git a/CI/pom.xml.circleci.java7 b/CI/pom.xml.circleci.java7 index c17a50e36253..ef34a78f420d 100644 --- a/CI/pom.xml.circleci.java7 +++ b/CI/pom.xml.circleci.java7 @@ -607,6 +607,42 @@ samples/server/petstore/jaxrs/jersey1 + + jaxrs-spec + + + env + java + + + + samples/server/petstore/jaxrs-spec + + + + jaxrs-spec-interface + + + env + java + + + + samples/server/petstore/jaxrs-spec-interface + + + + jaxrs-spec-interface-response + + + env + java + + + + samples/server/petstore/jaxrs-spec-interface-response + + typescript-fetch-client-tests-default @@ -853,6 +889,9 @@ samples/client/petstore/java/google-api-client samples/client/petstore/kotlin/ + samples/server/petstore/jaxrs-spec + samples/server/petstore/jaxrs-spec-interface + samples/server/petstore/jaxrs-spec-interface-response samples/server/petstore/java-vertx/rx samples/server/petstore/java-vertx/async samples/server/petstore/java-inflector @@ -876,7 +915,6 @@ samples/server/petstore/jaxrs-cxf-cdi samples/server/petstore/jaxrs-cxf-non-spring-app samples/server/petstore/java-msf4j - samples/server/petstore/jaxrs-spec-interface From d0ccac566397f23757dedb4a8f99c013221fc29a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rub=C3=A9n=20Mart=C3=ADnez?= Date: Wed, 8 Aug 2018 19:06:42 +0200 Subject: [PATCH 03/27] Fixed the generation of model properties whose data type is a composed (allOf) schema (#704) * #582 Fixed the generation of model properties whose data type is a composed (allOf) schema. Before this fix, the data type name of the generated property was that of the first model participating in the allOf clause. After this fix the property data type is again as expected: the one of the composed schema and not one of its parents. * Added unit test in order to have regression testing in the fix for the #582 issue (references to composed schemas should not get unaliased for them to get a proper data type name in the generation of model properties). * Run ./bin/utils/ensure-up-to-date to re-generate samples run in the CI. * Removed tabs from ModelUtilsTest.java --- .../codegen/utils/ModelUtils.java | 2 +- .../codegen/utils/ModelUtilsTest.java | 28 ++++++++++++++++--- 2 files changed, 25 insertions(+), 5 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ModelUtils.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ModelUtils.java index 2bb6481c49cb..c5afa2dd8b18 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ModelUtils.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ModelUtils.java @@ -648,7 +648,7 @@ public class ModelUtils { } else if (isStringSchema(ref) && (ref.getEnum() != null && !ref.getEnum().isEmpty())) { // top-level enum class return schema; - } else if (isMapSchema(ref) || isArraySchema(ref)) { // map/array def should be created as models + } else if (isMapSchema(ref) || isArraySchema(ref) || isComposedSchema(ref)) { // map/array def should be created as models return schema; } else { return unaliasSchema(allSchemas, allSchemas.get(ModelUtils.getSimpleRef(schema.get$ref()))); diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/utils/ModelUtilsTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/utils/ModelUtilsTest.java index ac9648e0243e..e09d27dbb950 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/utils/ModelUtilsTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/utils/ModelUtilsTest.java @@ -19,10 +19,7 @@ package org.openapitools.codegen.utils; import io.swagger.parser.OpenAPIParser; import io.swagger.v3.oas.models.OpenAPI; -import io.swagger.v3.oas.models.media.IntegerSchema; -import io.swagger.v3.oas.models.media.ObjectSchema; -import io.swagger.v3.oas.models.media.Schema; -import io.swagger.v3.oas.models.media.StringSchema; +import io.swagger.v3.oas.models.media.*; import io.swagger.v3.oas.models.parameters.Parameter; import io.swagger.v3.oas.models.parameters.RequestBody; import io.swagger.v3.oas.models.responses.ApiResponse; @@ -32,7 +29,10 @@ import org.openapitools.codegen.TestUtils; import org.testng.Assert; import org.testng.annotations.Test; +import java.util.Arrays; +import java.util.HashMap; import java.util.List; +import java.util.Map; public class ModelUtilsTest { @@ -173,4 +173,24 @@ public class ModelUtilsTest { Parameter result2 = ModelUtils.getReferencedParameter(openAPI, new Parameter().$ref("#/components/parameters/OtherParameter")); Assert.assertEquals(result2, otherParameter); } + + /** + * Issue https://github.com/OpenAPITools/openapi-generator/issues/582. + * Composed schemas should not get unaliased when generating model properties, in order to properly + * generate the property data type name. + */ + @Test + public void testComposedSchemasAreNotUnaliased() { + ComposedSchema composedSchema = new ComposedSchema().allOf(Arrays.asList( + new Schema<>().$ref("#/components/schemas/SomeSchema"), + new ObjectSchema() + )); + Schema refToComposedSchema = new Schema().$ref("#/components/schemas/SomeComposedSchema"); + + + Map allSchemas = new HashMap<>(); + allSchemas.put("SomeComposedSchema", composedSchema); + + Assert.assertEquals(refToComposedSchema, ModelUtils.unaliasSchema(allSchemas, refToComposedSchema)); + } } From 4060fcbb8bee149ddbe63470edfd8c13f85a7619 Mon Sep 17 00:00:00 2001 From: David Webster Date: Thu, 9 Aug 2018 12:42:11 +1000 Subject: [PATCH 04/27] Correct URL for openapi-generator.cli.sh in README.md (#770) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 09ceabc2ecce..0ca16c6f12ed 100644 --- a/README.md +++ b/README.md @@ -174,7 +174,7 @@ An example of setting this up (NOTE: Always evaluate scripts curled from externa ``` mkdir -p ~/bin/openapitools -curl https://raw.githubusercontent.com/OpenAPITools/openapi-generator/master/bin/utils/openapi-generator.cli.sh > ~/bin/openapitools/openapi-generator-cli +curl https://raw.githubusercontent.com/OpenAPITools/openapi-generator/master/bin/utils/openapi-generator-cli.sh > ~/bin/openapitools/openapi-generator-cli chmod u+x ~/bin/openapitools/openapi-generator-cli export PATH=$PATH:~/bin/openapitools/ ``` From 9920c435cab3d861417446a86fa72725ae632c4a Mon Sep 17 00:00:00 2001 From: Jim Schubert Date: Thu, 9 Aug 2018 03:56:15 -0400 Subject: [PATCH 05/27] [gradle] Support nullable system property values (#764) The gradle plugin sets all System properties before generation, then reverts them back to their original state. System.getProperty/setProperty return null if the property was not previously set. The Kotlin map was defined with non-nullable key/value constraints, so setting something not commonly set (modelDocs: "false") would result in an runtime exception. This changes the map to support nullable values, and rather than setting a null System property at the end, it clears those which previously had no value. --- .../samples/local-spec/build.gradle | 3 +++ .../generator/gradle/plugin/tasks/GenerateTask.kt | 15 ++++++++++----- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/modules/openapi-generator-gradle-plugin/samples/local-spec/build.gradle b/modules/openapi-generator-gradle-plugin/samples/local-spec/build.gradle index e9a5bb42e0ea..e5cde4680324 100644 --- a/modules/openapi-generator-gradle-plugin/samples/local-spec/build.gradle +++ b/modules/openapi-generator-gradle-plugin/samples/local-spec/build.gradle @@ -41,6 +41,9 @@ openApiGenerate { configOptions = [ dateLibrary: "java8" ] + systemProperties = [ + modelDocs: "false" + ] } task buildGoSdk(type: org.openapitools.generator.gradle.plugin.tasks.GenerateTask){ diff --git a/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/GenerateTask.kt b/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/GenerateTask.kt index db901f021c76..7c6ecd099da6 100644 --- a/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/GenerateTask.kt +++ b/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/GenerateTask.kt @@ -323,7 +323,7 @@ open class GenerateTask : DefaultTask() { @get:Internal val configOptions = project.objects.property>() - private val originalEnvironmentVariables = mutableMapOf() + private val originalEnvironmentVariables = mutableMapOf() private fun Property.ifNotEmpty(block: Property.(T) -> Unit) { if (isPresent) { @@ -352,8 +352,9 @@ open class GenerateTask : DefaultTask() { try { if (systemProperties.isPresent) { systemProperties.get().forEach { (key, value) -> - originalEnvironmentVariables[key] = System.getProperty(key) - System.setProperty(key, value) + // System.setProperty returns the original value for a key, or null. + // Cache the original value or null…we will late put the properties back in their original state. + originalEnvironmentVariables[key] = System.setProperty(key, value) configurator.addSystemProperty(key, value) } } @@ -540,8 +541,12 @@ open class GenerateTask : DefaultTask() { throw GradleException("Code generation failed.", e) } } finally { - originalEnvironmentVariables.forEach { entry -> - System.setProperty(entry.key, entry.value) + // Reset all modified system properties back to their original state + originalEnvironmentVariables.forEach { + when { + it.value == null -> System.clearProperty(it.key) + else -> System.setProperty(it.key, it.value) + } } originalEnvironmentVariables.clear() } From a0984a9be8076048c936f67209efe1003bf3cc7e Mon Sep 17 00:00:00 2001 From: antihax Date: Thu, 9 Aug 2018 10:27:51 -0500 Subject: [PATCH 06/27] [Core] Resolve Inline Models (#736) * Add InlineModelResolver.java * fix inline schema for OAS2 body parameter * skip warning, fix MapSchema cast error --- .../codegen/DefaultGenerator.java | 4 +- .../codegen/InlineModelResolver.java | 533 +++++++++ .../codegen/InlineModelResolverTest.java | 1012 +++++++++++++++++ 3 files changed, 1547 insertions(+), 2 deletions(-) create mode 100644 modules/openapi-generator/src/main/java/org/openapitools/codegen/InlineModelResolver.java create mode 100644 modules/openapi-generator/src/test/java/org/openapitools/codegen/InlineModelResolverTest.java diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultGenerator.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultGenerator.java index 54455f49c897..6d4264f48c1e 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultGenerator.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultGenerator.java @@ -787,8 +787,8 @@ public class DefaultGenerator extends AbstractGenerator implements Generator { configureOpenAPIInfo(); // resolve inline models - //InlineModelResolver inlineModelResolver = new InlineModelResolver(); - //inlineModelResolver.flatten(openAPI); + InlineModelResolver inlineModelResolver = new InlineModelResolver(); + inlineModelResolver.flatten(openAPI); List files = new ArrayList(); // models diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/InlineModelResolver.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/InlineModelResolver.java new file mode 100644 index 000000000000..057939f680b4 --- /dev/null +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/InlineModelResolver.java @@ -0,0 +1,533 @@ +package org.openapitools.codegen; + +import io.swagger.v3.oas.models.OpenAPI; +import io.swagger.v3.oas.models.media.Schema; +import io.swagger.v3.oas.models.media.ArraySchema; +import io.swagger.v3.oas.models.media.ObjectSchema; +import io.swagger.v3.oas.models.media.*; +import io.swagger.v3.oas.models.responses.ApiResponse; +import io.swagger.v3.oas.models.Operation; +import io.swagger.v3.oas.models.PathItem; +import io.swagger.v3.oas.models.parameters.Parameter; +import io.swagger.v3.oas.models.parameters.RequestBody; +import io.swagger.v3.oas.models.Paths; +import io.swagger.v3.core.util.Json; +import org.openapitools.codegen.utils.ModelUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import io.swagger.v3.oas.models.media.Content; +import io.swagger.v3.oas.models.media.MediaType; +import java.util.ArrayList; +import io.swagger.v3.oas.models.media.XML; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class InlineModelResolver { + private OpenAPI openapi; + private boolean skipMatches; + static Logger LOGGER = LoggerFactory.getLogger(InlineModelResolver.class); + Map addedModels = new HashMap(); + Map generatedSignature = new HashMap(); + + public void flatten(OpenAPI openapi) { + this.openapi = openapi; + + if (openapi.getComponents() == null) { + return; // There's nothing here + } + + if (openapi.getComponents().getSchemas() == null) { + openapi.getComponents().setSchemas(new HashMap()); + } + // operations + Map paths = openapi.getPaths(); + Map models = openapi.getComponents().getSchemas(); + if (paths != null) { + for (String pathname : paths.keySet()) { + PathItem path = paths.get(pathname); + for (Operation operation : path.readOperations()) { + RequestBody requestBody = operation.getRequestBody(); + if (requestBody != null) { + Schema model = ModelUtils.getSchemaFromRequestBody(requestBody); + if (model instanceof ObjectSchema) { + Schema obj = (Schema) model; + if (obj.getType() == null || "object".equals(obj.getType())) { + if (obj.getProperties() != null && obj.getProperties().size() > 0) { + flattenProperties(obj.getProperties(), pathname); + // for model name, use "title" if defined, otherwise default to 'inline_object' + String modelName = resolveModelName(obj.getTitle(), "inline_object"); + addGenerated(modelName, model); + openapi.getComponents().addSchemas(modelName, model); + + // create request body + RequestBody rb = new RequestBody(); + Content content = new Content(); + MediaType mt = new MediaType(); + Schema schema = new Schema(); + schema.set$ref(modelName); + mt.setSchema(schema); + // TODO assume JSON, need to support other payload later + content.addMediaType("application/json", mt); + rb.setContent(content); + // add to openapi "components" + if (openapi.getComponents().getRequestBodies() == null) { + Map requestBodies = new HashMap(); + requestBodies.put(modelName, rb); + openapi.getComponents().setRequestBodies(requestBodies); + } else { + openapi.getComponents().getRequestBodies().put(modelName, rb); + } + + // update requestBody to use $ref instead of inline def + requestBody.set$ref(modelName); + + } + } + } else if (model instanceof ArraySchema) { + ArraySchema am = (ArraySchema) model; + Schema inner = am.getItems(); + if (inner instanceof ObjectSchema) { + ObjectSchema op = (ObjectSchema) inner; + if (op.getProperties() != null && op.getProperties().size() > 0) { + flattenProperties(op.getProperties(), pathname); + String modelName = resolveModelName(op.getTitle(), null); + Schema innerModel = modelFromProperty(op, modelName); + String existing = matchGenerated(innerModel); + if (existing != null) { + Schema schema = new Schema().$ref(existing); + schema.setRequired(op.getRequired()); + am.setItems(schema); + } else { + Schema schema = new Schema().$ref(modelName); + schema.setRequired(op.getRequired()); + am.setItems(schema); + addGenerated(modelName, innerModel); + openapi.getComponents().addSchemas(modelName, innerModel); + } + } + } + } + } + + List parameters = operation.getParameters(); + if (parameters != null) { + for (Parameter parameter : parameters) { + if (parameter.getSchema() != null) { + Schema model = parameter.getSchema(); + if (model instanceof ObjectSchema) { + Schema obj = (Schema) model; + if (obj.getType() == null || "object".equals(obj.getType())) { + if (obj.getProperties() != null && obj.getProperties().size() > 0) { + flattenProperties(obj.getProperties(), pathname); + String modelName = resolveModelName(obj.getTitle(), parameter.getName()); + + parameter.$ref(modelName); + addGenerated(modelName, model); + openapi.getComponents().addSchemas(modelName, model); + } + } + } else if (model instanceof ArraySchema) { + ArraySchema am = (ArraySchema) model; + Schema inner = am.getItems(); + if (inner instanceof ObjectSchema) { + ObjectSchema op = (ObjectSchema) inner; + if (op.getProperties() != null && op.getProperties().size() > 0) { + flattenProperties(op.getProperties(), pathname); + String modelName = resolveModelName(op.getTitle(), parameter.getName()); + Schema innerModel = modelFromProperty(op, modelName); + String existing = matchGenerated(innerModel); + if (existing != null) { + Schema schema = new Schema().$ref(existing); + schema.setRequired(op.getRequired()); + am.setItems(schema); + } else { + Schema schema = new Schema().$ref(modelName); + schema.setRequired(op.getRequired()); + am.setItems(schema); + addGenerated(modelName, innerModel); + openapi.getComponents().addSchemas(modelName, innerModel); + } + } + } + } + } + } + } + Map responses = operation.getResponses(); + if (responses != null) { + for (String key : responses.keySet()) { + ApiResponse response = responses.get(key); + if (ModelUtils.getSchemaFromResponse(response) != null) { + Schema property = ModelUtils.getSchemaFromResponse(response); + if (property instanceof ObjectSchema) { + ObjectSchema op = (ObjectSchema) property; + if (op.getProperties() != null && op.getProperties().size() > 0) { + String modelName = resolveModelName(op.getTitle(), "inline_response_" + key); + Schema model = modelFromProperty(op, modelName); + String existing = matchGenerated(model); + Content content = response.getContent(); + for (MediaType mediaType : content.values()) { + if (existing != null) { + Schema schema = this.makeSchema(existing, property); + schema.setRequired(op.getRequired()); + mediaType.setSchema(schema); + } else { + Schema schema = this.makeSchema(modelName, property); + schema.setRequired(op.getRequired()); + mediaType.setSchema(schema); + addGenerated(modelName, model); + openapi.getComponents().addSchemas(modelName, model); + } + } + } + } else if (property instanceof ArraySchema) { + ArraySchema ap = (ArraySchema) property; + Schema inner = ap.getItems(); + if (inner instanceof ObjectSchema) { + ObjectSchema op = (ObjectSchema) inner; + if (op.getProperties() != null && op.getProperties().size() > 0) { + flattenProperties(op.getProperties(), pathname); + String modelName = resolveModelName(op.getTitle(), + "inline_response_" + key); + Schema innerModel = modelFromProperty(op, modelName); + String existing = matchGenerated(innerModel); + if (existing != null) { + Schema schema = this.makeSchema(existing, op); + schema.setRequired(op.getRequired()); + ap.setItems(schema); + } else { + Schema schema = this.makeSchema(modelName, op); + schema.setRequired(op.getRequired()); + ap.setItems(schema); + addGenerated(modelName, innerModel); + openapi.getComponents().addSchemas(modelName, innerModel); + } + } + } + } else if (property instanceof MapSchema) { + MapSchema mp = (MapSchema) property; + Schema innerProperty = (Schema) mp.getAdditionalProperties(); + if (innerProperty instanceof ObjectSchema) { + ObjectSchema op = (ObjectSchema) innerProperty; + if (op.getProperties() != null && op.getProperties().size() > 0) { + flattenProperties(op.getProperties(), pathname); + String modelName = resolveModelName(op.getTitle(), + "inline_response_" + key); + Schema innerModel = modelFromProperty(op, modelName); + String existing = matchGenerated(innerModel); + if (existing != null) { + Schema schema = new Schema().$ref(existing); + schema.setRequired(op.getRequired()); + mp.setAdditionalProperties(schema); + } else { + Schema schema = new Schema().$ref(modelName); + schema.setRequired(op.getRequired()); + mp.setAdditionalProperties(schema); + addGenerated(modelName, innerModel); + openapi.getComponents().addSchemas(modelName, innerModel); + } + } + } + } + } + } + } + } + } + } + // definitions + if (models != null) { + List modelNames = new ArrayList(models.keySet()); + for (String modelName : modelNames) { + Schema model = models.get(modelName); + if (model instanceof Schema) { + Schema m = (Schema) model; + Map properties = m.getProperties(); + flattenProperties(properties, modelName); + fixStringModel(m); + } else if (ModelUtils.isArraySchema(model)) { + ArraySchema m = (ArraySchema) model; + Schema inner = m.getItems(); + if (inner instanceof ObjectSchema) { + ObjectSchema op = (ObjectSchema) inner; + if (op.getProperties() != null && op.getProperties().size() > 0) { + String innerModelName = resolveModelName(op.getTitle(), modelName + "_inner"); + Schema innerModel = modelFromProperty(op, innerModelName); + String existing = matchGenerated(innerModel); + if (existing == null) { + openapi.getComponents().addSchemas(innerModelName, innerModel); + addGenerated(innerModelName, innerModel); + Schema schema = new Schema().$ref(innerModelName); + schema.setRequired(op.getRequired()); + m.setItems(schema); + } else { + Schema schema = new Schema().$ref(existing); + schema.setRequired(op.getRequired()); + m.setItems(schema); + } + } + } + } else if (ModelUtils.isComposedSchema(model)) { + ComposedSchema m = (ComposedSchema) model; + if (m.getAllOf() != null && !m.getAllOf().isEmpty()) { + Schema child = null; + for (Schema component : m.getAllOf()) { + if (component.get$ref() == null) { + child = component; + } + } + if (child != null) { + Map properties = child.getProperties(); + flattenProperties(properties, modelName); + } + } + } + } + } + } + + /** + * This function fix models that are string (mostly enum). Before this fix, the + * example would look something like that in the doc: "\"example from def\"" + * + * @param m Schema implementation + */ + private void fixStringModel(Schema m) { + if (m.getType() != null && m.getType().equals("string") && m.getExample() != null) { + String example = m.getExample().toString(); + if (example.substring(0, 1).equals("\"") && example.substring(example.length() - 1).equals("\"")) { + m.setExample(example.substring(1, example.length() - 1)); + } + } + } + + private String resolveModelName(String title, String key) { + if (title == null) { + return uniqueName(key); + } else { + return uniqueName(title); + } + } + + public String matchGenerated(Schema model) { + if (this.skipMatches) { + return null; + } + String json = Json.pretty(model); + if (generatedSignature.containsKey(json)) { + return generatedSignature.get(json); + } + return null; + } + + public void addGenerated(String name, Schema model) { + generatedSignature.put(Json.pretty(model), name); + } + + public String uniqueName(String key) { + if (key == null) { + key = "NULL_UNIQUE_NAME"; + LOGGER.warn("null key found. Default to NULL_UNIQUE_NAME"); + } + int count = 0; + boolean done = false; + key = key.replaceAll("[^a-z_\\.A-Z0-9 ]", ""); // FIXME: a parameter + // should not be + // assigned. Also declare + // the methods parameters + // as 'final'. + while (!done) { + String name = key; + if (count > 0) { + name = key + "_" + count; + } + if (openapi.getComponents().getSchemas() == null) { + return name; + } else if (!openapi.getComponents().getSchemas().containsKey(name)) { + return name; + } + count += 1; + } + return key; + } + + public void flattenProperties(Map properties, String path) { + if (properties == null) { + return; + } + Map propsToUpdate = new HashMap(); + Map modelsToAdd = new HashMap(); + for (String key : properties.keySet()) { + Schema property = properties.get(key); + if (property instanceof ObjectSchema && ((ObjectSchema) property).getProperties() != null + && ((ObjectSchema) property).getProperties().size() > 0) { + ObjectSchema op = (ObjectSchema) property; + String modelName = resolveModelName(op.getTitle(), path + "_" + key); + Schema model = modelFromProperty(op, modelName); + String existing = matchGenerated(model); + if (existing != null) { + Schema schema = new Schema().$ref(existing); + schema.setRequired(op.getRequired()); + propsToUpdate.put(key, schema); + } else { + Schema schema = new Schema().$ref(modelName); + schema.setRequired(op.getRequired()); + propsToUpdate.put(key, schema); + modelsToAdd.put(modelName, model); + addGenerated(modelName, model); + openapi.getComponents().addSchemas(modelName, model); + } + } else if (property instanceof ArraySchema) { + ArraySchema ap = (ArraySchema) property; + Schema inner = ap.getItems(); + if (inner instanceof ObjectSchema) { + ObjectSchema op = (ObjectSchema) inner; + if (op.getProperties() != null && op.getProperties().size() > 0) { + flattenProperties(op.getProperties(), path); + String modelName = resolveModelName(op.getTitle(), path + "_" + key); + Schema innerModel = modelFromProperty(op, modelName); + String existing = matchGenerated(innerModel); + if (existing != null) { + Schema schema = new Schema().$ref(existing); + schema.setRequired(op.getRequired()); + ap.setItems(schema); + } else { + Schema schema = new Schema().$ref(modelName); + schema.setRequired(op.getRequired()); + ap.setItems(schema); + addGenerated(modelName, innerModel); + openapi.getComponents().addSchemas(modelName, innerModel); + } + } + } + } + if (ModelUtils.isMapSchema(property)) { + Schema inner = (Schema) property.getAdditionalProperties(); + if (inner instanceof ObjectSchema) { + ObjectSchema op = (ObjectSchema) inner; + if (op.getProperties() != null && op.getProperties().size() > 0) { + flattenProperties(op.getProperties(), path); + String modelName = resolveModelName(op.getTitle(), path + "_" + key); + Schema innerModel = modelFromProperty(op, modelName); + String existing = matchGenerated(innerModel); + if (existing != null) { + Schema schema = new Schema().$ref(existing); + schema.setRequired(op.getRequired()); + property.setAdditionalProperties(schema); + } else { + Schema schema = new Schema().$ref(modelName); + schema.setRequired(op.getRequired()); + property.setAdditionalProperties(schema); + addGenerated(modelName, innerModel); + openapi.getComponents().addSchemas(modelName, innerModel); + } + } + } + } + } + if (propsToUpdate.size() > 0) { + for (String key : propsToUpdate.keySet()) { + properties.put(key, propsToUpdate.get(key)); + } + } + for (String key : modelsToAdd.keySet()) { + openapi.getComponents().addSchemas(key, modelsToAdd.get(key)); + this.addedModels.put(key, modelsToAdd.get(key)); + } + } + + @SuppressWarnings("static-method") + public Schema modelFromProperty(ArraySchema object, @SuppressWarnings("unused") String path) { + String description = object.getDescription(); + String example = null; + Object obj = object.getExample(); + + if (obj != null) { + example = obj.toString(); + } + Schema inner = object.getItems(); + if (inner instanceof ObjectSchema) { + ArraySchema model = new ArraySchema(); + model.setDescription(description); + model.setExample(example); + model.setItems(object.getItems()); + model.setName(object.getName()); + return model; + } + return null; + } + + public Schema modelFromProperty(ObjectSchema object, String path) { + String description = object.getDescription(); + String example = null; + Object obj = object.getExample(); + if (obj != null) { + example = obj.toString(); + } + XML xml = object.getXml(); + Map properties = object.getProperties(); + Schema model = new Schema(); + model.setDescription(description); + model.setExample(example); + model.setName(object.getName()); + model.setXml(xml); + if (properties != null) { + flattenProperties(properties, path); + model.setProperties(properties); + } + return model; + } + + @SuppressWarnings("static-method") + public Schema modelFromProperty(MapSchema object, @SuppressWarnings("unused") String path) { + String description = object.getDescription(); + String example = null; + Object obj = object.getExample(); + if (obj != null) { + example = obj.toString(); + } + ArraySchema model = new ArraySchema(); + model.setDescription(description); + model.setName(object.getName()); + model.setExample(example); + model.setItems((Schema) object.getAdditionalProperties()); + return model; + } + + /** + * Make a Schema + * + * @param ref new property name + * @param property Schema + * @return {@link Schema} A constructed OpenAPI property + */ + public Schema makeSchema(String ref, Schema property) { + Schema newProperty = new Schema().$ref(ref); + this.copyVendorExtensions(property, newProperty); + return newProperty; + } + + /** + * Copy vendor extensions from Model to another Model + * + * @param source source property + * @param target target property + */ + + public void copyVendorExtensions(Schema source, Schema target) { + Map vendorExtensions = source.getExtensions(); + for (String extName : vendorExtensions.keySet()) { + target.addExtension(extName, vendorExtensions.get(extName)); + } + } + + public boolean isSkipMatches() { + return skipMatches; + } + + public void setSkipMatches(boolean skipMatches) { + this.skipMatches = skipMatches; + } +} \ No newline at end of file diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/InlineModelResolverTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/InlineModelResolverTest.java new file mode 100644 index 000000000000..8ec2ee8ef1dd --- /dev/null +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/InlineModelResolverTest.java @@ -0,0 +1,1012 @@ +package org.openapitools.codegen; + +import io.swagger.v3.oas.models.*; +import io.swagger.v3.oas.models.parameters.Parameter; +import io.swagger.v3.core.util.Json; +import org.apache.commons.lang3.StringUtils; +import org.testng.annotations.Test; + +import java.util.HashMap; +import java.util.Map; + +import static org.testng.AssertJUnit.*; +/* +@SuppressWarnings("static-method") +public class InlineModelResolverTest { + @Test + public void resolveInlineModelTestWithoutTitle() throws Exception { + OpenAPI openapi = new OpenAPI(); + + openapi.addDefinition("User", new ModelImpl() + .name("user") + .description("a common user") + .property("name", new StringProperty()) + .property("address", new ObjectProperty() + ._default("default") + .access("access") + .readOnly(false) + .required(true) + .description("description") + .name("name") + .property("street", new StringProperty()) + .property("city", new StringProperty()))); + + new InlineModelResolver().flatten(openapi); + + ModelImpl user = (ModelImpl)openapi.getDefinitions().get("User"); + + assertNotNull(user); + assertTrue(user.getProperties().get("address") instanceof RefProperty); + + ModelImpl address = (ModelImpl)openapi.getDefinitions().get("User_address"); + assertNotNull(address); + assertNotNull(address.getProperties().get("city")); + assertNotNull(address.getProperties().get("street")); + } + + @Test + public void resolveInlineModelTestWithTitle() throws Exception { + OpenAPI openapi = new OpenAPI(); + + openapi.addDefinition("User", new ModelImpl() + .name("user") + .description("a common user") + .property("name", new StringProperty()) + .property("address", new ObjectProperty() + .title("UserAddressTitle") + ._default("default") + .access("access") + .readOnly(false) + .required(true) + .description("description") + .name("name") + .property("street", new StringProperty()) + .property("city", new StringProperty()))); + + new InlineModelResolver().flatten(openapi); + + ModelImpl user = (ModelImpl)openapi.getDefinitions().get("User"); + + assertNotNull(user); + assertTrue(user.getProperties().get("address") instanceof RefProperty); + + ModelImpl address = (ModelImpl)openapi.getDefinitions().get("UserAddressTitle"); + assertNotNull(address); + assertNotNull(address.getProperties().get("city")); + assertNotNull(address.getProperties().get("street")); + } + + @Test + public void resolveInlineModel2EqualInnerModels() throws Exception { + OpenAPI openapi = new OpenAPI(); + + openapi.addDefinition("User", new ModelImpl() + .name("user") + .description("a common user") + .property("name", new StringProperty()) + .property("address", new ObjectProperty() + .title("UserAddressTitle") + ._default("default") + .access("access") + .readOnly(false) + .required(true) + .description("description") + .name("name") + .property("street", new StringProperty()) + .property("city", new StringProperty()))); + + openapi.addDefinition("AnotherUser", new ModelImpl() + .name("user") + .description("a common user") + .property("name", new StringProperty()) + .property("lastName", new StringProperty()) + .property("address", new ObjectProperty() + .title("UserAddressTitle") + ._default("default") + .access("access") + .readOnly(false) + .required(true) + .description("description") + .name("name") + .property("street", new StringProperty()) + .property("city", new StringProperty()))); + + new InlineModelResolver().flatten(openapi); + + ModelImpl user = (ModelImpl)openapi.getDefinitions().get("User"); + + assertNotNull(user); + assertTrue(user.getProperties().get("address") instanceof RefProperty); + + ModelImpl address = (ModelImpl)openapi.getDefinitions().get("UserAddressTitle"); + assertNotNull(address); + assertNotNull(address.getProperties().get("city")); + assertNotNull(address.getProperties().get("street")); + ModelImpl duplicateAddress = (ModelImpl)openapi.getDefinitions().get("UserAddressTitle_0"); + assertNull(duplicateAddress); + } + + @Test + public void resolveInlineModel2DifferentInnerModelsWIthSameTitle() throws Exception { + OpenAPI openapi = new OpenAPI(); + + openapi.addDefinition("User", new ModelImpl() + .name("user") + .description("a common user") + .property("name", new StringProperty()) + .property("address", new ObjectProperty() + .title("UserAddressTitle") + ._default("default") + .access("access") + .readOnly(false) + .required(true) + .description("description") + .name("name") + .property("street", new StringProperty()) + .property("city", new StringProperty()))); + + openapi.addDefinition("AnotherUser", new ModelImpl() + .name("AnotherUser") + .description("a common user") + .property("name", new StringProperty()) + .property("lastName", new StringProperty()) + .property("address", new ObjectProperty() + .title("UserAddressTitle") + ._default("default") + .access("access") + .readOnly(false) + .required(true) + .description("description") + .name("name") + .property("street", new StringProperty()) + .property("city", new StringProperty()) + .property("apartment", new StringProperty()))); + + new InlineModelResolver().flatten(openapi); + + ModelImpl user = (ModelImpl)openapi.getDefinitions().get("User"); + + assertNotNull(user); + assertTrue(user.getProperties().get("address") instanceof RefProperty); + + ModelImpl address = (ModelImpl)openapi.getDefinitions().get("UserAddressTitle"); + assertNotNull(address); + assertNotNull(address.getProperties().get("city")); + assertNotNull(address.getProperties().get("street")); + ModelImpl duplicateAddress = (ModelImpl)openapi.getDefinitions().get("UserAddressTitle_1"); + assertNotNull(duplicateAddress); + assertNotNull(duplicateAddress.getProperties().get("city")); + assertNotNull(duplicateAddress.getProperties().get("street")); + assertNotNull(duplicateAddress.getProperties().get("apartment")); + } + + + @Test + public void testInlineResponseModel() throws Exception { + OpenAPI openapi = new OpenAPI(); + + openapi.path("/foo/bar", new Path() + .get(new Operation() + .response(200, new Response() + .description("it works!") + .schema(new ObjectProperty() + .property("name", new StringProperty()).vendorExtension("x-ext", "ext-prop"))))) + .path("/foo/baz", new Path() + .get(new Operation() + .response(200, new Response() + .vendorExtension("x-foo", "bar") + .description("it works!") + .schema(new ObjectProperty() + .property("name", new StringProperty()).vendorExtension("x-ext", "ext-prop"))))); + new InlineModelResolver().flatten(openapi); + + Map responses = openapi.getPaths().get("/foo/bar").getGet().getResponses(); + + Response response = responses.get("200"); + assertNotNull(response); + Property schema = response.getSchema(); + assertTrue(schema instanceof RefProperty); + assertEquals(1, schema.getVendorExtensions().size()); + assertEquals("ext-prop", schema.getVendorExtensions().get("x-ext")); + + ModelImpl model = (ModelImpl)openapi.getDefinitions().get("inline_response_200"); + assertTrue(model.getProperties().size() == 1); + assertNotNull(model.getProperties().get("name")); + assertTrue(model.getProperties().get("name") instanceof StringProperty); + } + + + @Test + public void testInlineResponseModelWithTitle() throws Exception { + OpenAPI openapi = new OpenAPI(); + + String responseTitle = "GetBarResponse"; + openapi.path("/foo/bar", new Path() + .get(new Operation() + .response(200, new Response() + .description("it works!") + .schema(new ObjectProperty().title(responseTitle) + .property("name", new StringProperty()))))) + .path("/foo/baz", new Path() + .get(new Operation() + .response(200, new Response() + .vendorExtension("x-foo", "bar") + .description("it works!") + .schema(new ObjectProperty() + .property("name", new StringProperty()))))); + new InlineModelResolver().flatten(openapi); + + Map responses = openapi.getPaths().get("/foo/bar").getGet().getResponses(); + + Response response = responses.get("200"); + assertNotNull(response); + assertTrue(response.getSchema() instanceof RefProperty); + + ModelImpl model = (ModelImpl)openapi.getDefinitions().get(responseTitle); + assertTrue(model.getProperties().size() == 1); + assertNotNull(model.getProperties().get("name")); + assertTrue(model.getProperties().get("name") instanceof StringProperty); + } + + + @Test + public void resolveInlineArrayModelWithTitle() throws Exception { + OpenAPI openapi = new OpenAPI(); + + openapi.addDefinition("User", new ArrayModel() + .items(new ObjectProperty() + .title("InnerUserTitle") + ._default("default") + .access("access") + .readOnly(false) + .required(true) + .description("description") + .name("name") + .property("street", new StringProperty()) + .property("city", new StringProperty()))); + + new InlineModelResolver().flatten(openapi); + + Model model = openapi.getDefinitions().get("User"); + assertTrue(model instanceof ArrayModel); + + Model user = openapi.getDefinitions().get("InnerUserTitle"); + assertNotNull(user); + assertEquals("description", user.getDescription()); + } + + @Test + public void resolveInlineArrayModelWithoutTitle() throws Exception { + OpenAPI openapi = new OpenAPI(); + + openapi.addDefinition("User", new ArrayModel() + .items(new ObjectProperty() + ._default("default") + .access("access") + .readOnly(false) + .required(true) + .description("description") + .name("name") + .property("street", new StringProperty()) + .property("city", new StringProperty()))); + + new InlineModelResolver().flatten(openapi); + + Model model = openapi.getDefinitions().get("User"); + assertTrue(model instanceof ArrayModel); + + Model user = openapi.getDefinitions().get("User_inner"); + assertNotNull(user); + assertEquals("description", user.getDescription()); + } + + + + + @Test + public void resolveInlineBodyParameter() throws Exception { + OpenAPI openapi = new OpenAPI(); + + openapi.path("/hello", new Path() + .get(new Operation() + .parameter(new BodyParameter() + .name("body") + .schema(new ModelImpl() + .property("address", new ObjectProperty() + .property("street", new StringProperty())) + .property("name", new StringProperty()))))); + + new InlineModelResolver().flatten(openapi); + + Operation operation = openapi.getPaths().get("/hello").getGet(); + BodyParameter bp = (BodyParameter)operation.getParameters().get(0); + assertTrue(bp.getSchema() instanceof RefModel); + + Model body = openapi.getDefinitions().get("body"); + assertTrue(body instanceof ModelImpl); + + ModelImpl impl = (ModelImpl) body; + assertNotNull(impl.getProperties().get("address")); + } + + @Test + public void resolveInlineBodyParameterWithRequired() throws Exception { + OpenAPI openapi = new OpenAPI(); + + openapi.path("/hello", new Path() + .get(new Operation() + .parameter(new BodyParameter() + .name("body") + .schema(new ModelImpl() + .property("address", new ObjectProperty() + .property("street", new StringProperty() + .required(true)) + .required(true)) + .property("name", new StringProperty()))))); + + new InlineModelResolver().flatten(openapi); + + Operation operation = openapi.getPaths().get("/hello").getGet(); + BodyParameter bp = (BodyParameter)operation.getParameters().get(0); + assertTrue(bp.getSchema() instanceof RefModel); + + Model body = openapi.getDefinitions().get("body"); + assertTrue(body instanceof ModelImpl); + + ModelImpl impl = (ModelImpl) body; + assertNotNull(impl.getProperties().get("address")); + + Property addressProperty = impl.getProperties().get("address"); + assertTrue(addressProperty instanceof RefProperty); + assertTrue(addressProperty.getRequired()); + + Model helloAddress = openapi.getDefinitions().get("hello_address"); + assertTrue(helloAddress instanceof ModelImpl); + + ModelImpl addressImpl = (ModelImpl) helloAddress; + assertNotNull(addressImpl); + + Property streetProperty = addressImpl.getProperties().get("street"); + assertTrue(streetProperty instanceof StringProperty); + assertTrue(streetProperty.getRequired()); + } + + @Test + public void resolveInlineBodyParameterWithTitle() throws Exception { + OpenAPI openapi = new OpenAPI(); + + ModelImpl addressModelItem = new ModelImpl(); + String addressModelName = "DetailedAddress"; + addressModelItem.setTitle(addressModelName); + openapi.path("/hello", new Path() + .get(new Operation() + .parameter(new BodyParameter() + .name("body") + .schema(addressModelItem + .property("address", new ObjectProperty() + .property("street", new StringProperty())) + .property("name", new StringProperty()))))); + + new InlineModelResolver().flatten(openapi); + + Operation operation = openapi.getPaths().get("/hello").getGet(); + BodyParameter bp = (BodyParameter)operation.getParameters().get(0); + assertTrue(bp.getSchema() instanceof RefModel); + + Model body = openapi.getDefinitions().get(addressModelName); + assertTrue(body instanceof ModelImpl); + + ModelImpl impl = (ModelImpl) body; + assertNotNull(impl.getProperties().get("address")); + } + + @Test + public void notResolveNonModelBodyParameter() throws Exception { + OpenAPI openapi = new OpenAPI(); + + openapi.path("/hello", new Path() + .get(new Operation() + .parameter(new BodyParameter() + .name("body") + .schema(new ModelImpl() + .type("string") + .format("binary"))))); + + new InlineModelResolver().flatten(openapi); + + Operation operation = openapi.getPaths().get("/hello").getGet(); + BodyParameter bp = (BodyParameter)operation.getParameters().get(0); + assertTrue(bp.getSchema() instanceof ModelImpl); + ModelImpl m = (ModelImpl) bp.getSchema(); + assertEquals("string", m.getType()); + assertEquals("binary", m.getFormat()); + } + + @Test + public void resolveInlineArrayBodyParameter() throws Exception { + OpenAPI openapi = new OpenAPI(); + + openapi.path("/hello", new Path() + .get(new Operation() + .parameter(new BodyParameter() + .name("body") + .schema(new ArrayModel() + .items(new ObjectProperty() + .property("address", new ObjectProperty() + .property("street", new StringProperty()))))))); + + new InlineModelResolver().flatten(openapi); + + Parameter param = openapi.getPaths().get("/hello").getGet().getParameters().get(0); + assertTrue(param instanceof BodyParameter); + + BodyParameter bp = (BodyParameter) param; + Model schema = bp.getSchema(); + + assertTrue(schema instanceof ArrayModel); + + ArrayModel am = (ArrayModel) schema; + Property inner = am.getItems(); + assertTrue(inner instanceof RefProperty); + + RefProperty rp = (RefProperty) inner; + + assertEquals(rp.getType(), "ref"); + assertEquals(rp.get$ref(), "#/definitions/body"); + assertEquals(rp.getSimpleRef(), "body"); + + Model inline = openapi.getDefinitions().get("body"); + assertNotNull(inline); + assertTrue(inline instanceof ModelImpl); + ModelImpl impl = (ModelImpl) inline; + RefProperty rpAddress = (RefProperty) impl.getProperties().get("address"); + assertNotNull(rpAddress); + assertEquals(rpAddress.getType(), "ref"); + assertEquals(rpAddress.get$ref(), "#/definitions/hello_address"); + assertEquals(rpAddress.getSimpleRef(), "hello_address"); + + Model inlineProp = openapi.getDefinitions().get("hello_address"); + assertNotNull(inlineProp); + assertTrue(inlineProp instanceof ModelImpl); + ModelImpl implProp = (ModelImpl) inlineProp; + assertNotNull(implProp.getProperties().get("street")); + assertTrue(implProp.getProperties().get("street") instanceof StringProperty); + } + + @Test + public void resolveInlineArrayResponse() throws Exception { + OpenAPI openapi = new OpenAPI(); + + ArrayProperty schema = new ArrayProperty() + .items(new ObjectProperty() + .property("name", new StringProperty()) + .vendorExtension("x-ext", "ext-items")) + .vendorExtension("x-ext", "ext-prop"); + openapi.path("/foo/baz", new Path() + .get(new Operation() + .response(200, new Response() + .vendorExtension("x-foo", "bar") + .description("it works!") + .schema(schema)))); + + new InlineModelResolver().flatten(openapi); + + Response response = openapi.getPaths().get("/foo/baz").getGet().getResponses().get("200"); + assertNotNull(response); + + assertNotNull(response.getSchema()); + Property responseProperty = response.getSchema(); + + // no need to flatten more + assertTrue(responseProperty instanceof ArrayProperty); + + ArrayProperty ap = (ArrayProperty) responseProperty; + assertEquals(1, ap.getVendorExtensions().size()); + assertEquals("ext-prop", ap.getVendorExtensions().get("x-ext")); + + Property p = ap.getItems(); + + assertNotNull(p); + + RefProperty rp = (RefProperty) p; + assertEquals(rp.getType(), "ref"); + assertEquals(rp.get$ref(), "#/definitions/inline_response_200"); + assertEquals(rp.getSimpleRef(), "inline_response_200"); + assertEquals(1, rp.getVendorExtensions().size()); + assertEquals("ext-items", rp.getVendorExtensions().get("x-ext")); + + Model inline = openapi.getDefinitions().get("inline_response_200"); + assertNotNull(inline); + assertTrue(inline instanceof ModelImpl); + ModelImpl impl = (ModelImpl) inline; + assertNotNull(impl.getProperties().get("name")); + assertTrue(impl.getProperties().get("name") instanceof StringProperty); + } + + @Test + public void resolveInlineArrayResponseWithTitle() throws Exception { + OpenAPI openapi = new OpenAPI(); + + openapi.path("/foo/baz", new Path() + .get(new Operation() + .response(200, new Response() + .vendorExtension("x-foo", "bar") + .description("it works!") + .schema(new ArrayProperty() + .items(new ObjectProperty() + .title("FooBar") + .property("name", new StringProperty())))))); + + new InlineModelResolver().flatten(openapi); + + Response response = openapi.getPaths().get("/foo/baz").getGet().getResponses().get("200"); + assertNotNull(response); + + assertNotNull(response.getSchema()); + Property responseProperty = response.getSchema(); + + // no need to flatten more + assertTrue(responseProperty instanceof ArrayProperty); + + ArrayProperty ap = (ArrayProperty) responseProperty; + Property p = ap.getItems(); + + assertNotNull(p); + + RefProperty rp = (RefProperty) p; + assertEquals(rp.getType(), "ref"); + assertEquals(rp.get$ref(), "#/definitions/"+ "FooBar"); + assertEquals(rp.getSimpleRef(), "FooBar"); + + Model inline = openapi.getDefinitions().get("FooBar"); + assertNotNull(inline); + assertTrue(inline instanceof ModelImpl); + ModelImpl impl = (ModelImpl) inline; + assertNotNull(impl.getProperties().get("name")); + assertTrue(impl.getProperties().get("name") instanceof StringProperty); + } + + @Test + public void testInlineMapResponse() throws Exception { + OpenAPI openapi = new OpenAPI(); + + MapProperty schema = new MapProperty(); + schema.setAdditionalProperties(new StringProperty()); + schema.setVendorExtension("x-ext", "ext-prop"); + + openapi.path("/foo/baz", new Path() + .get(new Operation() + .response(200, new Response() + .vendorExtension("x-foo", "bar") + .description("it works!") + .schema(schema)))); + new InlineModelResolver().flatten(openapi); + Json.prettyPrint(openapi); + + Response response = openapi.getPaths().get("/foo/baz").getGet().getResponses().get("200"); + + Property property = response.getSchema(); + assertTrue(property instanceof MapProperty); + assertTrue(openapi.getDefinitions().size() == 0); + assertEquals(1, property.getVendorExtensions().size()); + assertEquals("ext-prop", property.getVendorExtensions().get("x-ext")); + } + + @Test + public void testInlineMapResponseWithObjectProperty() throws Exception { + OpenAPI openapi = new OpenAPI(); + + MapProperty schema = new MapProperty(); + schema.setAdditionalProperties(new ObjectProperty() + .property("name", new StringProperty())); + schema.setVendorExtension("x-ext", "ext-prop"); + + openapi.path("/foo/baz", new Path() + .get(new Operation() + .response(200, new Response() + .vendorExtension("x-foo", "bar") + .description("it works!") + .schema(schema)))); + new InlineModelResolver().flatten(openapi); + + Response response = openapi.getPaths().get("/foo/baz").getGet().getResponses().get("200"); + Property property = response.getSchema(); + assertTrue(property instanceof MapProperty); + assertEquals(1, property.getVendorExtensions().size()); + assertEquals("ext-prop", property.getVendorExtensions().get("x-ext")); + assertTrue(openapi.getDefinitions().size() == 1); + + Model inline = openapi.getDefinitions().get("inline_response_200"); + assertTrue(inline instanceof ModelImpl); + ModelImpl impl = (ModelImpl) inline; + assertNotNull(impl.getProperties().get("name")); + assertTrue(impl.getProperties().get("name") instanceof StringProperty); + } + + @Test + public void testArrayResponse() { + OpenAPI openapi = new OpenAPI(); + + ArrayProperty schema = new ArrayProperty(); + schema.setItems(new ObjectProperty() + .property("name", new StringProperty())); + + openapi.path("/foo/baz", new Path() + .get(new Operation() + .response(200, new Response() + .vendorExtension("x-foo", "bar") + .description("it works!") + .schema(schema)))); + new InlineModelResolver().flatten(openapi); + + Response response = openapi.getPaths().get("/foo/baz").getGet().getResponses().get("200"); + assertTrue(response.getSchema() instanceof ArrayProperty); + + ArrayProperty am = (ArrayProperty) response.getSchema(); + Property items = am.getItems(); + assertTrue(items instanceof RefProperty); + RefProperty rp = (RefProperty) items; + assertEquals(rp.getType(), "ref"); + assertEquals(rp.get$ref(), "#/definitions/inline_response_200"); + assertEquals(rp.getSimpleRef(), "inline_response_200"); + + Model inline = openapi.getDefinitions().get("inline_response_200"); + assertTrue(inline instanceof ModelImpl); + ModelImpl impl = (ModelImpl) inline; + assertNotNull(impl.getProperties().get("name")); + assertTrue(impl.getProperties().get("name") instanceof StringProperty); + } + + @Test + public void testBasicInput() { + OpenAPI openapi = new OpenAPI(); + + ModelImpl user = new ModelImpl() + .property("name", new StringProperty()); + + openapi.path("/foo/baz", new Path() + .post(new Operation() + .parameter(new BodyParameter() + .name("myBody") + .schema(new RefModel("User"))))); + + openapi.addDefinition("User", user); + + new InlineModelResolver().flatten(openapi); + + Json.prettyPrint(openapi); + } + + @Test + public void testArbitraryObjectBodyParam() { + OpenAPI openapi = new OpenAPI(); + + openapi.path("/hello", new Path() + .get(new Operation() + .parameter(new BodyParameter() + .name("body") + .schema(new ModelImpl())))); + + new InlineModelResolver().flatten(openapi); + + Operation operation = openapi.getPaths().get("/hello").getGet(); + BodyParameter bp = (BodyParameter)operation.getParameters().get(0); + assertTrue(bp.getSchema() instanceof ModelImpl); + ModelImpl m = (ModelImpl) bp.getSchema(); + assertNull(m.getType()); + } + + @Test + public void testArbitraryObjectBodyParamInline() { + OpenAPI openapi = new OpenAPI(); + + openapi.path("/hello", new Path() + .get(new Operation() + .parameter(new BodyParameter() + .name("body") + .schema(new ModelImpl() + .property("arbitrary", new ObjectProperty()))))); + + new InlineModelResolver().flatten(openapi); + + Operation operation = openapi.getPaths().get("/hello").getGet(); + BodyParameter bp = (BodyParameter)operation.getParameters().get(0); + assertTrue(bp.getSchema() instanceof RefModel); + + Model body = openapi.getDefinitions().get("body"); + assertTrue(body instanceof ModelImpl); + + ModelImpl impl = (ModelImpl) body; + Property p = impl.getProperties().get("arbitrary"); + assertNotNull(p); + assertTrue(p instanceof ObjectProperty); + } + + @Test + public void testArbitraryObjectBodyParamWithArray() { + OpenAPI openapi = new OpenAPI(); + + openapi.path("/hello", new Path() + .get(new Operation() + .parameter(new BodyParameter() + .name("body") + .schema(new ArrayModel() + .items(new ObjectProperty()))))); + + new InlineModelResolver().flatten(openapi); + + Parameter param = openapi.getPaths().get("/hello").getGet().getParameters().get(0); + assertTrue(param instanceof BodyParameter); + + BodyParameter bp = (BodyParameter) param; + Model schema = bp.getSchema(); + + assertTrue(schema instanceof ArrayModel); + + ArrayModel am = (ArrayModel) schema; + Property inner = am.getItems(); + assertTrue(inner instanceof ObjectProperty); + + ObjectProperty op = (ObjectProperty) inner; + assertNotNull(op); + assertNull(op.getProperties()); + } + + @Test + public void testArbitraryObjectBodyParamArrayInline() { + OpenAPI openapi = new OpenAPI(); + + openapi.path("/hello", new Path() + .get(new Operation() + .parameter(new BodyParameter() + .name("body") + .schema(new ArrayModel() + .items(new ObjectProperty() + .property("arbitrary", new ObjectProperty())))))); + + new InlineModelResolver().flatten(openapi); + + Parameter param = openapi.getPaths().get("/hello").getGet().getParameters().get(0); + assertTrue(param instanceof BodyParameter); + + BodyParameter bp = (BodyParameter) param; + Model schema = bp.getSchema(); + + assertTrue(schema instanceof ArrayModel); + + ArrayModel am = (ArrayModel) schema; + Property inner = am.getItems(); + assertTrue(inner instanceof RefProperty); + + RefProperty rp = (RefProperty) inner; + + assertEquals(rp.getType(), "ref"); + assertEquals(rp.get$ref(), "#/definitions/body"); + assertEquals(rp.getSimpleRef(), "body"); + + Model inline = openapi.getDefinitions().get("body"); + assertNotNull(inline); + assertTrue(inline instanceof ModelImpl); + ModelImpl impl = (ModelImpl) inline; + Property p = impl.getProperties().get("arbitrary"); + assertNotNull(p); + assertTrue(p instanceof ObjectProperty); + } + + @Test + public void testArbitraryObjectResponse() { + OpenAPI openapi = new OpenAPI(); + + openapi.path("/foo/bar", new Path() + .get(new Operation() + .response(200, new Response() + .description("it works!") + .schema(new ObjectProperty())))); + new InlineModelResolver().flatten(openapi); + + Map responses = openapi.getPaths().get("/foo/bar").getGet().getResponses(); + + Response response = responses.get("200"); + assertNotNull(response); + assertTrue(response.getSchema() instanceof ObjectProperty); + ObjectProperty op = (ObjectProperty) response.getSchema(); + assertNull(op.getProperties()); + } + + @Test + public void testArbitraryObjectResponseArray() { + OpenAPI openapi = new OpenAPI(); + + openapi.path("/foo/baz", new Path() + .get(new Operation() + .response(200, new Response() + .description("it works!") + .schema(new ArrayProperty() + .items(new ObjectProperty()))))); + new InlineModelResolver().flatten(openapi); + + Response response = openapi.getPaths().get("/foo/baz").getGet().getResponses().get("200"); + assertTrue(response.getSchema() instanceof ArrayProperty); + + ArrayProperty am = (ArrayProperty) response.getSchema(); + Property items = am.getItems(); + assertTrue(items instanceof ObjectProperty); + ObjectProperty op = (ObjectProperty) items; + assertNull(op.getProperties()); + } + + @Test + public void testArbitraryObjectResponseArrayInline() { + OpenAPI openapi = new OpenAPI(); + + openapi.path("/foo/baz", new Path() + .get(new Operation() + .response(200, new Response() + .vendorExtension("x-foo", "bar") + .description("it works!") + .schema(new ArrayProperty() + .items(new ObjectProperty() + .property("arbitrary", new ObjectProperty())))))); + + new InlineModelResolver().flatten(openapi); + + Response response = openapi.getPaths().get("/foo/baz").getGet().getResponses().get("200"); + assertNotNull(response); + + assertNotNull(response.getSchema()); + Property responseProperty = response.getSchema(); + assertTrue(responseProperty instanceof ArrayProperty); + + ArrayProperty ap = (ArrayProperty) responseProperty; + Property p = ap.getItems(); + assertNotNull(p); + + RefProperty rp = (RefProperty) p; + assertEquals(rp.getType(), "ref"); + assertEquals(rp.get$ref(), "#/definitions/inline_response_200"); + assertEquals(rp.getSimpleRef(), "inline_response_200"); + + Model inline = openapi.getDefinitions().get("inline_response_200"); + assertNotNull(inline); + assertTrue(inline instanceof ModelImpl); + ModelImpl impl = (ModelImpl) inline; + Property inlineProp = impl.getProperties().get("arbitrary"); + assertNotNull(inlineProp); + assertTrue(inlineProp instanceof ObjectProperty); + ObjectProperty op = (ObjectProperty) inlineProp; + assertNull(op.getProperties()); + } + + @Test + public void testArbitraryObjectResponseMapInline() { + OpenAPI openapi = new OpenAPI(); + + MapProperty schema = new MapProperty(); + schema.setAdditionalProperties(new ObjectProperty()); + + openapi.path("/foo/baz", new Path() + .get(new Operation() + .response(200, new Response() + .description("it works!") + .schema(schema)))); + new InlineModelResolver().flatten(openapi); + + Response response = openapi.getPaths().get("/foo/baz").getGet().getResponses().get("200"); + + Property property = response.getSchema(); + assertTrue(property instanceof MapProperty); + assertTrue(openapi.getDefinitions().size() == 0); + Property inlineProp = ((MapProperty) property).getAdditionalProperties(); + assertTrue(inlineProp instanceof ObjectProperty); + ObjectProperty op = (ObjectProperty) inlineProp; + assertNull(op.getProperties()); + } + + @Test + public void testArbitraryObjectModelInline() { + OpenAPI openapi = new OpenAPI(); + + openapi.addDefinition("User", new ModelImpl() + .name("user") + .description("a common user") + .property("name", new StringProperty()) + .property("arbitrary", new ObjectProperty() + .title("title") + ._default("default") + .access("access") + .readOnly(false) + .required(true) + .description("description") + .name("name"))); + + new InlineModelResolver().flatten(openapi); + + ModelImpl user = (ModelImpl)openapi.getDefinitions().get("User"); + assertNotNull(user); + Property inlineProp = user.getProperties().get("arbitrary"); + assertTrue(inlineProp instanceof ObjectProperty); + ObjectProperty op = (ObjectProperty) inlineProp; + assertNull(op.getProperties()); + } + + @Test + public void testArbitraryObjectModelWithArrayInlineWithoutTitle() { + OpenAPI openapi = new OpenAPI(); + + openapi.addDefinition("User", new ArrayModel() + .items(new ObjectProperty() + ._default("default") + .access("access") + .readOnly(false) + .required(true) + .description("description") + .name("name") + .property("arbitrary", new ObjectProperty()))); + + new InlineModelResolver().flatten(openapi); + + Model model = openapi.getDefinitions().get("User"); + assertTrue(model instanceof ArrayModel); + ArrayModel am = (ArrayModel) model; + Property inner = am.getItems(); + assertTrue(inner instanceof RefProperty); + + ModelImpl userInner = (ModelImpl)openapi.getDefinitions().get("User_inner"); + assertNotNull(userInner); + Property inlineProp = userInner.getProperties().get("arbitrary"); + assertTrue(inlineProp instanceof ObjectProperty); + ObjectProperty op = (ObjectProperty) inlineProp; + assertNull(op.getProperties()); + } + + @Test + public void testArbitraryObjectModelWithArrayInlineWithTitle() { + OpenAPI openapi = new OpenAPI(); + + openapi.addDefinition("User", new ArrayModel() + .items(new ObjectProperty() + .title("InnerUserTitle") + ._default("default") + .access("access") + .readOnly(false) + .required(true) + .description("description") + .name("name") + .property("arbitrary", new ObjectProperty()))); + + new InlineModelResolver().flatten(openapi); + + Model model = openapi.getDefinitions().get("User"); + assertTrue(model instanceof ArrayModel); + ArrayModel am = (ArrayModel) model; + Property inner = am.getItems(); + assertTrue(inner instanceof RefProperty); + + ModelImpl userInner = (ModelImpl)openapi.getDefinitions().get("InnerUserTitle"); + assertNotNull(userInner); + Property inlineProp = userInner.getProperties().get("arbitrary"); + assertTrue(inlineProp instanceof ObjectProperty); + ObjectProperty op = (ObjectProperty) inlineProp; + assertNull(op.getProperties()); + } + + @Test + public void testEmptyExampleOnStrinngTypeModels() { + OpenAPI openapi = new OpenAPI(); + + RefProperty refProperty = new RefProperty(); + refProperty.set$ref("#/definitions/Test"); + + openapi.path("/hello", new Path() + .get(new Operation() + .response(200, new Response() + .schema(new ArrayProperty() + .items(refProperty))))); + + openapi.addDefinition("Test", new ModelImpl() + .example(StringUtils.EMPTY) + .type("string")); + new InlineModelResolver().flatten(openapi); + } +} +*/ \ No newline at end of file From 987fd7704237c305a41934964352e2d5b50a879d Mon Sep 17 00:00:00 2001 From: Daniel Miller Date: Thu, 9 Aug 2018 16:01:15 -0700 Subject: [PATCH 07/27] [cpp-restsdk] Support multi-line descriptions (#753) * Update IndentedLambda to take optional prefix * Add `multiline_comment_4` to CppRestSdkClient * Update cpp-restsdk example --- .../codegen/languages/AbstractCppCodegen.java | 23 ++++++++++++++ .../codegen/mustache/IndentedLambda.java | 30 +++++++++++++++++-- .../cpp-rest-sdk-client/api-header.mustache | 2 +- .../cpp-restsdk/.openapi-generator/VERSION | 2 +- .../client/petstore/cpp-restsdk/ApiClient.cpp | 2 +- .../client/petstore/cpp-restsdk/ApiClient.h | 2 +- .../petstore/cpp-restsdk/ApiConfiguration.cpp | 2 +- .../petstore/cpp-restsdk/ApiConfiguration.h | 2 +- .../petstore/cpp-restsdk/ApiException.cpp | 2 +- .../petstore/cpp-restsdk/ApiException.h | 2 +- .../petstore/cpp-restsdk/HttpContent.cpp | 2 +- .../client/petstore/cpp-restsdk/HttpContent.h | 2 +- .../client/petstore/cpp-restsdk/IHttpBody.h | 2 +- .../client/petstore/cpp-restsdk/JsonBody.cpp | 2 +- .../client/petstore/cpp-restsdk/JsonBody.h | 2 +- .../client/petstore/cpp-restsdk/ModelBase.cpp | 2 +- .../client/petstore/cpp-restsdk/ModelBase.h | 2 +- .../cpp-restsdk/MultipartFormData.cpp | 2 +- .../petstore/cpp-restsdk/MultipartFormData.h | 2 +- .../client/petstore/cpp-restsdk/Object.cpp | 2 +- samples/client/petstore/cpp-restsdk/Object.h | 2 +- .../petstore/cpp-restsdk/api/PetApi.cpp | 2 +- .../client/petstore/cpp-restsdk/api/PetApi.h | 2 +- .../petstore/cpp-restsdk/api/StoreApi.cpp | 2 +- .../petstore/cpp-restsdk/api/StoreApi.h | 2 +- .../petstore/cpp-restsdk/api/UserApi.cpp | 2 +- .../client/petstore/cpp-restsdk/api/UserApi.h | 2 +- .../cpp-restsdk/model/ApiResponse.cpp | 2 +- .../petstore/cpp-restsdk/model/ApiResponse.h | 2 +- .../petstore/cpp-restsdk/model/Category.cpp | 2 +- .../petstore/cpp-restsdk/model/Category.h | 2 +- .../petstore/cpp-restsdk/model/Order.cpp | 2 +- .../client/petstore/cpp-restsdk/model/Order.h | 2 +- .../client/petstore/cpp-restsdk/model/Pet.cpp | 2 +- .../client/petstore/cpp-restsdk/model/Pet.h | 2 +- .../client/petstore/cpp-restsdk/model/Tag.cpp | 2 +- .../client/petstore/cpp-restsdk/model/Tag.h | 2 +- .../petstore/cpp-restsdk/model/User.cpp | 2 +- .../client/petstore/cpp-restsdk/model/User.h | 2 +- 39 files changed, 88 insertions(+), 39 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCppCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCppCodegen.java index c53021a7534b..22f49a37e143 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCppCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCppCodegen.java @@ -19,13 +19,17 @@ package org.openapitools.codegen.languages; import io.swagger.v3.oas.models.media.Schema; +import com.google.common.collect.ImmutableMap; +import com.samskivert.mustache.Mustache; import org.openapitools.codegen.CodegenConfig; import org.openapitools.codegen.CodegenProperty; import org.openapitools.codegen.DefaultCodegen; +import org.openapitools.codegen.mustache.IndentedLambda; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.util.Arrays; +import java.util.Map; abstract public class AbstractCppCodegen extends DefaultCodegen implements CodegenConfig { private static final Logger LOGGER = LoggerFactory.getLogger(AbstractCppCodegen.class); @@ -242,4 +246,23 @@ abstract public class AbstractCppCodegen extends DefaultCodegen implements Codeg public String getTypeDeclaration(String str) { return "std::shared_ptr<" + toModelName(str) + ">"; } + + public void processOpts() { + super.processOpts(); + addMustacheLambdas(additionalProperties); + } + + private void addMustacheLambdas(Map objs) { + + Map lambdas = new ImmutableMap.Builder() + .put("multiline_comment_4", new IndentedLambda(4, " ", "///")) + .build(); + + if (objs.containsKey("lambda")) { + LOGGER.warn("A property named 'lambda' already exists. Mustache lambdas renamed from 'lambda' to '_lambda'."); + objs.put("_lambda", lambdas); + } else { + objs.put("lambda", lambdas); + } + } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/mustache/IndentedLambda.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/mustache/IndentedLambda.java index d1b0b38266f5..66873c311c1b 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/mustache/IndentedLambda.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/mustache/IndentedLambda.java @@ -43,13 +43,14 @@ import java.io.Writer; */ public class IndentedLambda implements Mustache.Lambda { private final int prefixSpaceCount; + private final String prefix; private int spaceCode; /** * Constructs a new instance of {@link IndentedLambda}, with an indent count of 4 spaces */ public IndentedLambda() { - this(4, " "); + this(4, " ", null); } /** @@ -59,15 +60,38 @@ public class IndentedLambda implements Mustache.Lambda { * @param indentionCharacter String representation of the character used in the indent (e.g. " ", "\t", "."). */ public IndentedLambda(int prefixSpaceCount, String indentionCharacter) { - this(prefixSpaceCount, Character.codePointAt(indentionCharacter, 0)); + this(prefixSpaceCount, Character.codePointAt(indentionCharacter, 0), null); + } + + /** + * Constructs a new instance of {@link IndentedLambda}, with customized indent count and intention character + * + * @param prefixSpaceCount The number of indented characters to apply as a prefix to a fragment. + * @param indentionCharacter String representation of the character used in the indent (e.g. " ", "\t", "."). + * @param prefix An optional prefix to prepend before the line (useful for multi-line comments). + */ + public IndentedLambda(int prefixSpaceCount, String indentionCharacter, String prefix) { + this(prefixSpaceCount, Character.codePointAt(indentionCharacter, 0), prefix); } /** * Constructs a new instance of {@link IndentedLambda} * * @param prefixSpaceCount The number of indented characters to apply as a prefix to a fragment. + * @param indentionCodePoint Code point of the single character used for indentation. */ private IndentedLambda(int prefixSpaceCount, int indentionCodePoint) { + this(prefixSpaceCount, indentionCodePoint, null); + } + + /** + * Constructs a new instance of {@link IndentedLambda} + * + * @param prefixSpaceCount The number of indented characters to apply as a prefix to a fragment. + * @param indentionCodePoint Code point of the single character used for indentation. + * @param prefix An optional prefix to prepend before the line (useful for multi-line comments). + */ + private IndentedLambda(int prefixSpaceCount, int indentionCodePoint, String prefix) { if (prefixSpaceCount <= 0) { throw new IllegalArgumentException("prefixSpaceCount must be greater than 0"); } @@ -78,6 +102,7 @@ public class IndentedLambda implements Mustache.Lambda { this.prefixSpaceCount = prefixSpaceCount; this.spaceCode = indentionCodePoint; + this.prefix = prefix; } @Override @@ -96,6 +121,7 @@ public class IndentedLambda implements Mustache.Lambda { // So, we want to skip the first line. if (i > 0) { sb.append(prefixedIndention); + if (prefix != null) sb.append(prefix); } sb.append(line); diff --git a/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/api-header.mustache b/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/api-header.mustache index ec97511314fc..8f7aad025476 100644 --- a/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/api-header.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/api-header.mustache @@ -62,7 +62,7 @@ public: /// {{notes}} /// {{#allParams}} - /// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}} + /// {{#lambda.multiline_comment_4}}{{description}}{{/lambda.multiline_comment_4}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}} {{/allParams}} pplx::task<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}}> {{operationId}}( {{#allParams}} diff --git a/samples/client/petstore/cpp-restsdk/.openapi-generator/VERSION b/samples/client/petstore/cpp-restsdk/.openapi-generator/VERSION index 0f58aa041419..14900cee60e8 100644 --- a/samples/client/petstore/cpp-restsdk/.openapi-generator/VERSION +++ b/samples/client/petstore/cpp-restsdk/.openapi-generator/VERSION @@ -1 +1 @@ -3.1.2-SNAPSHOT \ No newline at end of file +3.2.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/cpp-restsdk/ApiClient.cpp b/samples/client/petstore/cpp-restsdk/ApiClient.cpp index dab66e0e6e1c..a9bb151f9e84 100644 --- a/samples/client/petstore/cpp-restsdk/ApiClient.cpp +++ b/samples/client/petstore/cpp-restsdk/ApiClient.cpp @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.1.2-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.2.1-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/ApiClient.h b/samples/client/petstore/cpp-restsdk/ApiClient.h index 58d8e78ac07d..f39ca55d1074 100644 --- a/samples/client/petstore/cpp-restsdk/ApiClient.h +++ b/samples/client/petstore/cpp-restsdk/ApiClient.h @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.1.2-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.2.1-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/ApiConfiguration.cpp b/samples/client/petstore/cpp-restsdk/ApiConfiguration.cpp index 0f91d7c2cba8..5ed86c2fe9dc 100644 --- a/samples/client/petstore/cpp-restsdk/ApiConfiguration.cpp +++ b/samples/client/petstore/cpp-restsdk/ApiConfiguration.cpp @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.1.2-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.2.1-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/ApiConfiguration.h b/samples/client/petstore/cpp-restsdk/ApiConfiguration.h index 54dc39c26cfa..8ff2be702909 100644 --- a/samples/client/petstore/cpp-restsdk/ApiConfiguration.h +++ b/samples/client/petstore/cpp-restsdk/ApiConfiguration.h @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.1.2-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.2.1-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/ApiException.cpp b/samples/client/petstore/cpp-restsdk/ApiException.cpp index 1cceca2e6de5..1def094d90a3 100644 --- a/samples/client/petstore/cpp-restsdk/ApiException.cpp +++ b/samples/client/petstore/cpp-restsdk/ApiException.cpp @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.1.2-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.2.1-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/ApiException.h b/samples/client/petstore/cpp-restsdk/ApiException.h index ffd7877f3a5f..00ab158d8a2b 100644 --- a/samples/client/petstore/cpp-restsdk/ApiException.h +++ b/samples/client/petstore/cpp-restsdk/ApiException.h @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.1.2-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.2.1-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/HttpContent.cpp b/samples/client/petstore/cpp-restsdk/HttpContent.cpp index a5823e01eff4..ef9cbaaa0fe4 100644 --- a/samples/client/petstore/cpp-restsdk/HttpContent.cpp +++ b/samples/client/petstore/cpp-restsdk/HttpContent.cpp @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.1.2-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.2.1-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/HttpContent.h b/samples/client/petstore/cpp-restsdk/HttpContent.h index d3950dbd7835..e73cacb9f7e6 100644 --- a/samples/client/petstore/cpp-restsdk/HttpContent.h +++ b/samples/client/petstore/cpp-restsdk/HttpContent.h @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.1.2-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.2.1-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/IHttpBody.h b/samples/client/petstore/cpp-restsdk/IHttpBody.h index 26a846e5f75c..2462d4ed5703 100644 --- a/samples/client/petstore/cpp-restsdk/IHttpBody.h +++ b/samples/client/petstore/cpp-restsdk/IHttpBody.h @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.1.2-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.2.1-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/JsonBody.cpp b/samples/client/petstore/cpp-restsdk/JsonBody.cpp index 1958337d03de..bf8101adfa73 100644 --- a/samples/client/petstore/cpp-restsdk/JsonBody.cpp +++ b/samples/client/petstore/cpp-restsdk/JsonBody.cpp @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.1.2-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.2.1-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/JsonBody.h b/samples/client/petstore/cpp-restsdk/JsonBody.h index 3159dfa94d00..47eee72244b7 100644 --- a/samples/client/petstore/cpp-restsdk/JsonBody.h +++ b/samples/client/petstore/cpp-restsdk/JsonBody.h @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.1.2-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.2.1-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/ModelBase.cpp b/samples/client/petstore/cpp-restsdk/ModelBase.cpp index a4dc77d750c9..f451f594b6c5 100644 --- a/samples/client/petstore/cpp-restsdk/ModelBase.cpp +++ b/samples/client/petstore/cpp-restsdk/ModelBase.cpp @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.1.2-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.2.1-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/ModelBase.h b/samples/client/petstore/cpp-restsdk/ModelBase.h index 4d804a460137..dff9405b649b 100644 --- a/samples/client/petstore/cpp-restsdk/ModelBase.h +++ b/samples/client/petstore/cpp-restsdk/ModelBase.h @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.1.2-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.2.1-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/MultipartFormData.cpp b/samples/client/petstore/cpp-restsdk/MultipartFormData.cpp index 7879d7afe441..271f9cb16147 100644 --- a/samples/client/petstore/cpp-restsdk/MultipartFormData.cpp +++ b/samples/client/petstore/cpp-restsdk/MultipartFormData.cpp @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.1.2-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.2.1-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/MultipartFormData.h b/samples/client/petstore/cpp-restsdk/MultipartFormData.h index 8f03432efa8a..6a081df69f10 100644 --- a/samples/client/petstore/cpp-restsdk/MultipartFormData.h +++ b/samples/client/petstore/cpp-restsdk/MultipartFormData.h @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.1.2-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.2.1-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/Object.cpp b/samples/client/petstore/cpp-restsdk/Object.cpp index a0d392f89951..6702388f1b02 100644 --- a/samples/client/petstore/cpp-restsdk/Object.cpp +++ b/samples/client/petstore/cpp-restsdk/Object.cpp @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.1.2-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.2.1-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/Object.h b/samples/client/petstore/cpp-restsdk/Object.h index a6ce69a13ad8..6d731d337a67 100644 --- a/samples/client/petstore/cpp-restsdk/Object.h +++ b/samples/client/petstore/cpp-restsdk/Object.h @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.1.2-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.2.1-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/api/PetApi.cpp b/samples/client/petstore/cpp-restsdk/api/PetApi.cpp index 1e3f68f82291..d90f5119a07c 100644 --- a/samples/client/petstore/cpp-restsdk/api/PetApi.cpp +++ b/samples/client/petstore/cpp-restsdk/api/PetApi.cpp @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.1.2-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.2.1-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/api/PetApi.h b/samples/client/petstore/cpp-restsdk/api/PetApi.h index 477738c30b2e..2f5c70e77e6b 100644 --- a/samples/client/petstore/cpp-restsdk/api/PetApi.h +++ b/samples/client/petstore/cpp-restsdk/api/PetApi.h @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.1.2-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.2.1-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/api/StoreApi.cpp b/samples/client/petstore/cpp-restsdk/api/StoreApi.cpp index c73c34e395c0..267c8d700965 100644 --- a/samples/client/petstore/cpp-restsdk/api/StoreApi.cpp +++ b/samples/client/petstore/cpp-restsdk/api/StoreApi.cpp @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.1.2-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.2.1-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/api/StoreApi.h b/samples/client/petstore/cpp-restsdk/api/StoreApi.h index 0f3e53e3d3bc..4d78791de44c 100644 --- a/samples/client/petstore/cpp-restsdk/api/StoreApi.h +++ b/samples/client/petstore/cpp-restsdk/api/StoreApi.h @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.1.2-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.2.1-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/api/UserApi.cpp b/samples/client/petstore/cpp-restsdk/api/UserApi.cpp index 9f97981f9284..91980ca0069c 100644 --- a/samples/client/petstore/cpp-restsdk/api/UserApi.cpp +++ b/samples/client/petstore/cpp-restsdk/api/UserApi.cpp @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.1.2-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.2.1-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/api/UserApi.h b/samples/client/petstore/cpp-restsdk/api/UserApi.h index e02bc2df54bb..d4218faa6a9c 100644 --- a/samples/client/petstore/cpp-restsdk/api/UserApi.h +++ b/samples/client/petstore/cpp-restsdk/api/UserApi.h @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.1.2-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.2.1-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/model/ApiResponse.cpp b/samples/client/petstore/cpp-restsdk/model/ApiResponse.cpp index b8a7e58a3b71..a6655ee08e0f 100644 --- a/samples/client/petstore/cpp-restsdk/model/ApiResponse.cpp +++ b/samples/client/petstore/cpp-restsdk/model/ApiResponse.cpp @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.1.2-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.2.1-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/model/ApiResponse.h b/samples/client/petstore/cpp-restsdk/model/ApiResponse.h index bad104156764..6a569200a774 100644 --- a/samples/client/petstore/cpp-restsdk/model/ApiResponse.h +++ b/samples/client/petstore/cpp-restsdk/model/ApiResponse.h @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.1.2-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.2.1-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/model/Category.cpp b/samples/client/petstore/cpp-restsdk/model/Category.cpp index e765cdccd081..202d10217383 100644 --- a/samples/client/petstore/cpp-restsdk/model/Category.cpp +++ b/samples/client/petstore/cpp-restsdk/model/Category.cpp @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.1.2-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.2.1-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/model/Category.h b/samples/client/petstore/cpp-restsdk/model/Category.h index 93c2e24a51f3..c0d2845d49f9 100644 --- a/samples/client/petstore/cpp-restsdk/model/Category.h +++ b/samples/client/petstore/cpp-restsdk/model/Category.h @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.1.2-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.2.1-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/model/Order.cpp b/samples/client/petstore/cpp-restsdk/model/Order.cpp index fdad2a0ef4ea..18a68d8f34d2 100644 --- a/samples/client/petstore/cpp-restsdk/model/Order.cpp +++ b/samples/client/petstore/cpp-restsdk/model/Order.cpp @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.1.2-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.2.1-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/model/Order.h b/samples/client/petstore/cpp-restsdk/model/Order.h index b83944fc7e25..a53ddd22cc1a 100644 --- a/samples/client/petstore/cpp-restsdk/model/Order.h +++ b/samples/client/petstore/cpp-restsdk/model/Order.h @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.1.2-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.2.1-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/model/Pet.cpp b/samples/client/petstore/cpp-restsdk/model/Pet.cpp index 23b929497215..bb346dfd76c1 100644 --- a/samples/client/petstore/cpp-restsdk/model/Pet.cpp +++ b/samples/client/petstore/cpp-restsdk/model/Pet.cpp @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.1.2-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.2.1-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/model/Pet.h b/samples/client/petstore/cpp-restsdk/model/Pet.h index 6746c826ca81..c2617e844c30 100644 --- a/samples/client/petstore/cpp-restsdk/model/Pet.h +++ b/samples/client/petstore/cpp-restsdk/model/Pet.h @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.1.2-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.2.1-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/model/Tag.cpp b/samples/client/petstore/cpp-restsdk/model/Tag.cpp index 91e608bec9e2..d931065e8059 100644 --- a/samples/client/petstore/cpp-restsdk/model/Tag.cpp +++ b/samples/client/petstore/cpp-restsdk/model/Tag.cpp @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.1.2-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.2.1-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/model/Tag.h b/samples/client/petstore/cpp-restsdk/model/Tag.h index 11c00f1bfe27..3523c66e02e0 100644 --- a/samples/client/petstore/cpp-restsdk/model/Tag.h +++ b/samples/client/petstore/cpp-restsdk/model/Tag.h @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.1.2-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.2.1-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/model/User.cpp b/samples/client/petstore/cpp-restsdk/model/User.cpp index 8484091ae8c3..faca6ef4c96d 100644 --- a/samples/client/petstore/cpp-restsdk/model/User.cpp +++ b/samples/client/petstore/cpp-restsdk/model/User.cpp @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.1.2-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.2.1-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/client/petstore/cpp-restsdk/model/User.h b/samples/client/petstore/cpp-restsdk/model/User.h index 1a8271f26e62..318d3723831f 100644 --- a/samples/client/petstore/cpp-restsdk/model/User.h +++ b/samples/client/petstore/cpp-restsdk/model/User.h @@ -4,7 +4,7 @@ * * OpenAPI spec version: 1.0.0 * - * NOTE: This class is auto generated by OpenAPI-Generator 3.1.2-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator 3.2.1-SNAPSHOT. * https://openapi-generator.tech * Do not edit the class manually. */ From 748d1d70cbc868d1bba47418cf76d7c988ee56ab Mon Sep 17 00:00:00 2001 From: William Cheng Date: Fri, 10 Aug 2018 15:48:19 +0800 Subject: [PATCH 08/27] update groupId in pom (#779) --- samples/client/petstore/go/pom.xml | 2 +- samples/client/petstore/perl/pom.xml | 2 +- samples/client/petstore/ruby/pom.xml | 2 +- samples/client/petstore/scala-akka/pom.xml | 2 +- samples/client/petstore/typescript-angular-v2/npm/pom.xml | 2 +- samples/client/petstore/typescript-angular-v4.3/npm/pom.xml | 2 +- samples/client/petstore/typescript-angular-v4/npm/pom.xml | 2 +- .../petstore/typescript-angular-v6-provided-in-root/pom.xml | 2 +- samples/client/petstore/typescript-angularjs/pom.xml | 2 +- samples/client/petstore/typescript-fetch/builds/default/pom.xml | 2 +- .../client/petstore/typescript-fetch/builds/es6-target/pom.xml | 2 +- .../petstore/typescript-fetch/builds/with-npm-version/pom.xml | 2 +- samples/client/petstore/typescript-fetch/tests/default/pom.xml | 2 +- samples/client/petstore/typescript-node/npm/pom.xml | 2 +- samples/server/petstore/java-vertx/async/pom.xml | 2 +- samples/server/petstore/java-vertx/rx/pom.xml | 2 +- 16 files changed, 16 insertions(+), 16 deletions(-) diff --git a/samples/client/petstore/go/pom.xml b/samples/client/petstore/go/pom.xml index 9350f9881d92..082720066314 100644 --- a/samples/client/petstore/go/pom.xml +++ b/samples/client/petstore/go/pom.xml @@ -1,6 +1,6 @@ 4.0.0 - com.wordnik + org.openapitools Goswagger pom 1.0.0 diff --git a/samples/client/petstore/perl/pom.xml b/samples/client/petstore/perl/pom.xml index d761d022cd61..e4ad8fbf6009 100644 --- a/samples/client/petstore/perl/pom.xml +++ b/samples/client/petstore/perl/pom.xml @@ -1,6 +1,6 @@ 4.0.0 - com.wordnik + org.openapitools PerlPetstoreClientTests pom 1.0-SNAPSHOT diff --git a/samples/client/petstore/ruby/pom.xml b/samples/client/petstore/ruby/pom.xml index 2e720e226b22..f4c621fca53f 100644 --- a/samples/client/petstore/ruby/pom.xml +++ b/samples/client/petstore/ruby/pom.xml @@ -1,6 +1,6 @@ 4.0.0 - com.wordnik + org.openapitools RubyPetstoreClientTests pom 1.0-SNAPSHOT diff --git a/samples/client/petstore/scala-akka/pom.xml b/samples/client/petstore/scala-akka/pom.xml index 264dad8d1a58..20bf1d9209f4 100644 --- a/samples/client/petstore/scala-akka/pom.xml +++ b/samples/client/petstore/scala-akka/pom.xml @@ -240,4 +240,4 @@ - \ No newline at end of file + diff --git a/samples/client/petstore/typescript-angular-v2/npm/pom.xml b/samples/client/petstore/typescript-angular-v2/npm/pom.xml index bbdce5d5da9b..813fbfca88ea 100644 --- a/samples/client/petstore/typescript-angular-v2/npm/pom.xml +++ b/samples/client/petstore/typescript-angular-v2/npm/pom.xml @@ -1,6 +1,6 @@ 4.0.0 - com.wordnik + org.openapitools TSAngular2PestoreClientTests pom 1.0-SNAPSHOT diff --git a/samples/client/petstore/typescript-angular-v4.3/npm/pom.xml b/samples/client/petstore/typescript-angular-v4.3/npm/pom.xml index fdc35dd82912..5d48e6a3e731 100644 --- a/samples/client/petstore/typescript-angular-v4.3/npm/pom.xml +++ b/samples/client/petstore/typescript-angular-v4.3/npm/pom.xml @@ -1,6 +1,6 @@ 4.0.0 - com.wordnik + org.openapitools TSAngular43PestoreClientTests pom 1.0-SNAPSHOT diff --git a/samples/client/petstore/typescript-angular-v4/npm/pom.xml b/samples/client/petstore/typescript-angular-v4/npm/pom.xml index 7a610e08f6ef..6fb9db534599 100644 --- a/samples/client/petstore/typescript-angular-v4/npm/pom.xml +++ b/samples/client/petstore/typescript-angular-v4/npm/pom.xml @@ -1,6 +1,6 @@ 4.0.0 - com.wordnik + org.openapitools TSAngular4PestoreClientTests pom 1.0-SNAPSHOT diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/pom.xml b/samples/client/petstore/typescript-angular-v6-provided-in-root/pom.xml index 3848ddf87c01..ee3bb1ecffd0 100644 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/pom.xml +++ b/samples/client/petstore/typescript-angular-v6-provided-in-root/pom.xml @@ -1,6 +1,6 @@ 4.0.0 - com.wordnik + org.openapitools TypeScriptAngular6PestoreClientTests pom 1.0-SNAPSHOT diff --git a/samples/client/petstore/typescript-angularjs/pom.xml b/samples/client/petstore/typescript-angularjs/pom.xml index 6072fc71140f..e334e2d5cadc 100644 --- a/samples/client/petstore/typescript-angularjs/pom.xml +++ b/samples/client/petstore/typescript-angularjs/pom.xml @@ -1,6 +1,6 @@ 4.0.0 - com.wordnik + org.openapitools TypeScriptAngularPestoreClientTests pom 1.0-SNAPSHOT diff --git a/samples/client/petstore/typescript-fetch/builds/default/pom.xml b/samples/client/petstore/typescript-fetch/builds/default/pom.xml index 6b36b1d83c46..b40b83a0c751 100644 --- a/samples/client/petstore/typescript-fetch/builds/default/pom.xml +++ b/samples/client/petstore/typescript-fetch/builds/default/pom.xml @@ -1,6 +1,6 @@ 4.0.0 - com.wordnik + org.openapitools TypeScriptAngularBuildPestoreClientTests pom 1.0-SNAPSHOT diff --git a/samples/client/petstore/typescript-fetch/builds/es6-target/pom.xml b/samples/client/petstore/typescript-fetch/builds/es6-target/pom.xml index 8b8e6052761e..db6dfdfeb6aa 100644 --- a/samples/client/petstore/typescript-fetch/builds/es6-target/pom.xml +++ b/samples/client/petstore/typescript-fetch/builds/es6-target/pom.xml @@ -1,6 +1,6 @@ 4.0.0 - com.wordnik + org.openapitools TypeScriptAngularBuildES6PestoreClientTests pom 1.0-SNAPSHOT diff --git a/samples/client/petstore/typescript-fetch/builds/with-npm-version/pom.xml b/samples/client/petstore/typescript-fetch/builds/with-npm-version/pom.xml index b7725ec2309e..339fe7665186 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-npm-version/pom.xml +++ b/samples/client/petstore/typescript-fetch/builds/with-npm-version/pom.xml @@ -1,6 +1,6 @@ 4.0.0 - com.wordnik + org.openapitools TypeScriptAngularBuildWithNPMVersionPestoreClientTests pom 1.0-SNAPSHOT diff --git a/samples/client/petstore/typescript-fetch/tests/default/pom.xml b/samples/client/petstore/typescript-fetch/tests/default/pom.xml index 5e76c65dfede..92063ea7bcc5 100644 --- a/samples/client/petstore/typescript-fetch/tests/default/pom.xml +++ b/samples/client/petstore/typescript-fetch/tests/default/pom.xml @@ -1,6 +1,6 @@ 4.0.0 - com.wordnik + org.openapitools TypeScriptFetchPestoreClientTests pom 1.0-SNAPSHOT diff --git a/samples/client/petstore/typescript-node/npm/pom.xml b/samples/client/petstore/typescript-node/npm/pom.xml index 1e4796b6b231..a69d53db3173 100644 --- a/samples/client/petstore/typescript-node/npm/pom.xml +++ b/samples/client/petstore/typescript-node/npm/pom.xml @@ -1,6 +1,6 @@ 4.0.0 - com.wordnik + org.openapitools TypeScriptNodeNPMPestoreClientTests pom 1.0-SNAPSHOT diff --git a/samples/server/petstore/java-vertx/async/pom.xml b/samples/server/petstore/java-vertx/async/pom.xml index 7485723d5ef8..0d89408e84d0 100644 --- a/samples/server/petstore/java-vertx/async/pom.xml +++ b/samples/server/petstore/java-vertx/async/pom.xml @@ -88,4 +88,4 @@ - \ No newline at end of file + diff --git a/samples/server/petstore/java-vertx/rx/pom.xml b/samples/server/petstore/java-vertx/rx/pom.xml index 2a914afc4ec3..bc586ffa263c 100644 --- a/samples/server/petstore/java-vertx/rx/pom.xml +++ b/samples/server/petstore/java-vertx/rx/pom.xml @@ -88,4 +88,4 @@ - \ No newline at end of file + From d019bbd2c71645d3322e0109256b1a1200717dcd Mon Sep 17 00:00:00 2001 From: Dec12 | Fujigon Date: Fri, 10 Aug 2018 18:24:24 +0900 Subject: [PATCH 09/27] [Java][jaxrs-jersey] add sample with jaxrs-jersey + openapi v3 (#778) * create sample with "jaxrs-jersey" language & openapi v3 * circle ci setting * fix typo. also add "jaxrs-jersey" to all samples profile * artifactId conflicts. rename. * generate samples with "./bin/openapi3/jaxrs-jersey-petstore.sh" --- CI/pom.xml.circleci | 14 + CI/pom.xml.circleci.java7 | 14 + bin/openapi3/jaxrs-jersey-petstore.sh | 32 +++ pom.xml | 13 + .../jaxrs-jersey/.openapi-generator-ignore | 23 ++ .../jaxrs-jersey/.openapi-generator/VERSION | 1 + .../server/petstore/jaxrs-jersey/README.md | 23 ++ samples/server/petstore/jaxrs-jersey/pom.xml | 193 +++++++++++++ .../org/openapitools/api/ApiException.java | 10 + .../org/openapitools/api/ApiOriginFilter.java | 22 ++ .../openapitools/api/ApiResponseMessage.java | 69 +++++ .../openapitools/api/JacksonJsonProvider.java | 29 ++ .../openapitools/api/NotFoundException.java | 10 + .../gen/java/org/openapitools/api/PetApi.java | 211 ++++++++++++++ .../org/openapitools/api/PetApiService.java | 30 ++ .../openapitools/api/RFC3339DateFormat.java | 19 ++ .../java/org/openapitools/api/StoreApi.java | 115 ++++++++ .../org/openapitools/api/StoreApiService.java | 25 ++ .../java/org/openapitools/api/StringUtil.java | 42 +++ .../java/org/openapitools/api/UserApi.java | 165 +++++++++++ .../org/openapitools/api/UserApiService.java | 29 ++ .../java/org/openapitools/model/Category.java | 115 ++++++++ .../openapitools/model/ModelApiResponse.java | 139 +++++++++ .../java/org/openapitools/model/Order.java | 246 ++++++++++++++++ .../gen/java/org/openapitools/model/Pet.java | 264 ++++++++++++++++++ .../gen/java/org/openapitools/model/Tag.java | 115 ++++++++ .../gen/java/org/openapitools/model/User.java | 259 +++++++++++++++++ .../java/org/openapitools/api/Bootstrap.java | 31 ++ .../api/factories/PetApiServiceFactory.java | 13 + .../api/factories/StoreApiServiceFactory.java | 13 + .../api/factories/UserApiServiceFactory.java | 13 + .../api/impl/PetApiServiceImpl.java | 62 ++++ .../api/impl/StoreApiServiceImpl.java | 41 +++ .../api/impl/UserApiServiceImpl.java | 61 ++++ .../src/main/webapp/WEB-INF/web.xml | 63 +++++ 35 files changed, 2524 insertions(+) create mode 100644 bin/openapi3/jaxrs-jersey-petstore.sh create mode 100644 samples/server/petstore/jaxrs-jersey/.openapi-generator-ignore create mode 100644 samples/server/petstore/jaxrs-jersey/.openapi-generator/VERSION create mode 100644 samples/server/petstore/jaxrs-jersey/README.md create mode 100644 samples/server/petstore/jaxrs-jersey/pom.xml create mode 100644 samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/ApiException.java create mode 100644 samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/ApiOriginFilter.java create mode 100644 samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/ApiResponseMessage.java create mode 100644 samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/JacksonJsonProvider.java create mode 100644 samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/NotFoundException.java create mode 100644 samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/PetApi.java create mode 100644 samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/PetApiService.java create mode 100644 samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/RFC3339DateFormat.java create mode 100644 samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/StoreApi.java create mode 100644 samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/StoreApiService.java create mode 100644 samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/StringUtil.java create mode 100644 samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/UserApi.java create mode 100644 samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/UserApiService.java create mode 100644 samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/model/Category.java create mode 100644 samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/model/ModelApiResponse.java create mode 100644 samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/model/Order.java create mode 100644 samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/model/Pet.java create mode 100644 samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/model/Tag.java create mode 100644 samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/model/User.java create mode 100644 samples/server/petstore/jaxrs-jersey/src/main/java/org/openapitools/api/Bootstrap.java create mode 100644 samples/server/petstore/jaxrs-jersey/src/main/java/org/openapitools/api/factories/PetApiServiceFactory.java create mode 100644 samples/server/petstore/jaxrs-jersey/src/main/java/org/openapitools/api/factories/StoreApiServiceFactory.java create mode 100644 samples/server/petstore/jaxrs-jersey/src/main/java/org/openapitools/api/factories/UserApiServiceFactory.java create mode 100644 samples/server/petstore/jaxrs-jersey/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java create mode 100644 samples/server/petstore/jaxrs-jersey/src/main/java/org/openapitools/api/impl/StoreApiServiceImpl.java create mode 100644 samples/server/petstore/jaxrs-jersey/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java create mode 100644 samples/server/petstore/jaxrs-jersey/src/main/webapp/WEB-INF/web.xml diff --git a/CI/pom.xml.circleci b/CI/pom.xml.circleci index b5dd34e4c9c3..26296c47b1db 100644 --- a/CI/pom.xml.circleci +++ b/CI/pom.xml.circleci @@ -607,6 +607,19 @@ samples/server/petstore/jaxrs/jersey1 + + + jaxrs-jersey + + + env + java + + + + samples/server/petstore/jaxrs-jersey + + jaxrs-spec @@ -898,6 +911,7 @@ samples/client/petstore/kotlin-threetenbp/ samples/client/petstore/kotlin-string/ + samples/server/petstore/jaxrs-jersey samples/server/petstore/jaxrs-spec samples/server/petstore/jaxrs-spec-interface samples/server/petstore/jaxrs-spec-interface-response diff --git a/CI/pom.xml.circleci.java7 b/CI/pom.xml.circleci.java7 index ef34a78f420d..56e6688a965e 100644 --- a/CI/pom.xml.circleci.java7 +++ b/CI/pom.xml.circleci.java7 @@ -607,6 +607,19 @@ samples/server/petstore/jaxrs/jersey1 + + + jaxrs-jersey + + + env + java + + + + samples/server/petstore/jaxrs-jersey + + jaxrs-spec @@ -889,6 +902,7 @@ samples/client/petstore/java/google-api-client samples/client/petstore/kotlin/ + samples/server/petstore/jaxrs-jersey samples/server/petstore/jaxrs-spec samples/server/petstore/jaxrs-spec-interface samples/server/petstore/jaxrs-spec-interface-response diff --git a/bin/openapi3/jaxrs-jersey-petstore.sh b/bin/openapi3/jaxrs-jersey-petstore.sh new file mode 100644 index 000000000000..86487d172cca --- /dev/null +++ b/bin/openapi3/jaxrs-jersey-petstore.sh @@ -0,0 +1,32 @@ +#!/bin/sh + +SCRIPT="$0" +echo "# START SCRIPT: $SCRIPT" + +while [ -h "$SCRIPT" ] ; do + ls=`ls -ld "$SCRIPT"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + SCRIPT="$link" + else + SCRIPT=`dirname "$SCRIPT"`/"$link" + fi +done + +if [ ! -d "${APP_DIR}" ]; then + APP_DIR=`dirname "$SCRIPT"`/.. + APP_DIR=`cd "${APP_DIR}"; pwd` +fi + +executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" + +if [ ! -f "$executable" ] +then + mvn clean package +fi + +# if you've executed sbt assembly previously it will use that instead. +export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties" +ags="generate --artifact-id "openapiv3-jaxrs-jersey-petstore-server" -t modules/openapi-generator/src/main/resources/JavaJaxRS/ -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g jaxrs-jersey -o samples/server/petstore/jaxrs-jersey $@" + +java $JAVA_OPTS -jar $executable $ags diff --git a/pom.xml b/pom.xml index e30cd436b891..6756c1923d4a 100644 --- a/pom.xml +++ b/pom.xml @@ -715,6 +715,19 @@ samples/server/petstore/jaxrs/jersey1 + + + jaxrs-jersey + + + env + java + + + + samples/server/petstore/jaxrs-jersey + + jaxrs-spec diff --git a/samples/server/petstore/jaxrs-jersey/.openapi-generator-ignore b/samples/server/petstore/jaxrs-jersey/.openapi-generator-ignore new file mode 100644 index 000000000000..7484ee590a38 --- /dev/null +++ b/samples/server/petstore/jaxrs-jersey/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/samples/server/petstore/jaxrs-jersey/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-jersey/.openapi-generator/VERSION new file mode 100644 index 000000000000..14900cee60e8 --- /dev/null +++ b/samples/server/petstore/jaxrs-jersey/.openapi-generator/VERSION @@ -0,0 +1 @@ +3.2.1-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-jersey/README.md b/samples/server/petstore/jaxrs-jersey/README.md new file mode 100644 index 000000000000..ed0042044917 --- /dev/null +++ b/samples/server/petstore/jaxrs-jersey/README.md @@ -0,0 +1,23 @@ +# Swagger Jersey generated server + +## Overview +This server was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the +[OpenAPI-Spec](https://openapis.org) from a remote server, you can easily generate a server stub. This +is an example of building a OpenAPI-enabled JAX-RS server. + +This example uses the [JAX-RS](https://jax-rs-spec.java.net/) framework. + +To run the server, please execute the following: + +``` +mvn clean package jetty:run +``` + +You can then view the swagger listing here: + +``` +http://localhost:8080/v2/openapi.json +``` + +Note that if you have configured the `host` to be something other than localhost, the calls through +swagger-ui will be directed to that host and not localhost! \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-jersey/pom.xml b/samples/server/petstore/jaxrs-jersey/pom.xml new file mode 100644 index 000000000000..973329638f0f --- /dev/null +++ b/samples/server/petstore/jaxrs-jersey/pom.xml @@ -0,0 +1,193 @@ + + 4.0.0 + org.openapitools + openapiv3-jaxrs-jersey-petstore-server + jar + openapiv3-jaxrs-jersey-petstore-server + 1.0.0 + + + + Unlicense + http://www.apache.org/licenses/LICENSE-2.0.html + repo + + + + + src/main/java + + + org.apache.maven.plugins + maven-war-plugin + 3.1.0 + + + maven-failsafe-plugin + 2.6 + + + + integration-test + verify + + + + + + org.eclipse.jetty + jetty-maven-plugin + ${jetty-version} + + + / + + target/${project.artifactId}-${project.version} + 8079 + stopit + 10 + + 8080 + 60000 + + + + + javax.validation + validation-api + ${beanvalidation-version} + + + + + start-jetty + pre-integration-test + + start + + + 0 + true + + + + stop-jetty + post-integration-test + + stop + + + + + + org.codehaus.mojo + build-helper-maven-plugin + 1.9.1 + + + add-source + generate-sources + + add-source + + + + src/gen/java + + + + + + + + + + io.swagger + swagger-jersey2-jaxrs + compile + ${swagger-core-version} + + + ch.qos.logback + logback-classic + ${logback-version} + compile + + + ch.qos.logback + logback-core + ${logback-version} + compile + + + junit + junit + ${junit-version} + test + + + javax.servlet + servlet-api + ${servlet-api-version} + + + org.glassfish.jersey.containers + jersey-container-servlet-core + ${jersey2-version} + + + org.glassfish.jersey.media + jersey-media-multipart + ${jersey2-version} + + + com.fasterxml.jackson.datatype + jackson-datatype-joda + ${jackson-version} + + + com.fasterxml.jackson.jaxrs + jackson-jaxrs-json-provider + ${jackson-version} + + + + com.brsanthu + migbase64 + 2.2 + + + + + + javax.validation + validation-api + ${beanvalidation-version} + provided + + + + + + sonatype-snapshots + https://oss.sonatype.org/content/repositories/snapshots + + true + + + + + 1.7 + ${java.version} + ${java.version} + 1.5.18 + 1.1.0.Final + 9.2.9.v20150224 + 2.22.2 + 2.8.9 + 4.12 + 1.1.7 + 2.5 + UTF-8 + + diff --git a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/ApiException.java b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/ApiException.java new file mode 100644 index 000000000000..2d2990bc7f02 --- /dev/null +++ b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/ApiException.java @@ -0,0 +1,10 @@ +package org.openapitools.api; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen", date = "2018-08-10T15:02:11.723+09:00[Asia/Tokyo]") +public class ApiException extends Exception{ + private int code; + public ApiException (int code, String msg) { + super(msg); + this.code = code; + } +} diff --git a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/ApiOriginFilter.java b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/ApiOriginFilter.java new file mode 100644 index 000000000000..96f2e3483005 --- /dev/null +++ b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/ApiOriginFilter.java @@ -0,0 +1,22 @@ +package org.openapitools.api; + +import java.io.IOException; + +import javax.servlet.*; +import javax.servlet.http.HttpServletResponse; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen", date = "2018-08-10T15:02:11.723+09:00[Asia/Tokyo]") +public class ApiOriginFilter implements javax.servlet.Filter { + public void doFilter(ServletRequest request, ServletResponse response, + FilterChain chain) throws IOException, ServletException { + HttpServletResponse res = (HttpServletResponse) response; + res.addHeader("Access-Control-Allow-Origin", "*"); + res.addHeader("Access-Control-Allow-Methods", "GET, POST, DELETE, PUT"); + res.addHeader("Access-Control-Allow-Headers", "Content-Type"); + chain.doFilter(request, response); + } + + public void destroy() {} + + public void init(FilterConfig filterConfig) throws ServletException {} +} \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/ApiResponseMessage.java b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/ApiResponseMessage.java new file mode 100644 index 000000000000..d25a2f4d834e --- /dev/null +++ b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/ApiResponseMessage.java @@ -0,0 +1,69 @@ +package org.openapitools.api; + +import javax.xml.bind.annotation.XmlTransient; + +@javax.xml.bind.annotation.XmlRootElement +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen", date = "2018-08-10T15:02:11.723+09:00[Asia/Tokyo]") +public class ApiResponseMessage { + public static final int ERROR = 1; + public static final int WARNING = 2; + public static final int INFO = 3; + public static final int OK = 4; + public static final int TOO_BUSY = 5; + + int code; + String type; + String message; + + public ApiResponseMessage(){} + + public ApiResponseMessage(int code, String message){ + this.code = code; + switch(code){ + case ERROR: + setType("error"); + break; + case WARNING: + setType("warning"); + break; + case INFO: + setType("info"); + break; + case OK: + setType("ok"); + break; + case TOO_BUSY: + setType("too busy"); + break; + default: + setType("unknown"); + break; + } + this.message = message; + } + + @XmlTransient + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } +} diff --git a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/JacksonJsonProvider.java b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/JacksonJsonProvider.java new file mode 100644 index 000000000000..d41d7a1e255d --- /dev/null +++ b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/JacksonJsonProvider.java @@ -0,0 +1,29 @@ +package org.openapitools.api; + +import com.fasterxml.jackson.databind.DeserializationFeature; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.SerializationFeature; + +import com.fasterxml.jackson.datatype.joda.*; + +import com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider; + +import javax.ws.rs.Produces; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.ext.Provider; + +@Provider +@Produces({MediaType.APPLICATION_JSON}) +public class JacksonJsonProvider extends JacksonJaxbJsonProvider { + + public JacksonJsonProvider() { + + ObjectMapper objectMapper = new ObjectMapper() + .disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) + .disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS) + .registerModule(new JodaModule()) + .setDateFormat(new RFC3339DateFormat()); + + setMapper(objectMapper); + } +} \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/NotFoundException.java b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/NotFoundException.java new file mode 100644 index 000000000000..edfc4e392a82 --- /dev/null +++ b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/NotFoundException.java @@ -0,0 +1,10 @@ +package org.openapitools.api; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen", date = "2018-08-10T15:02:11.723+09:00[Asia/Tokyo]") +public class NotFoundException extends ApiException { + private int code; + public NotFoundException (int code, String msg) { + super(code, msg); + this.code = code; + } +} diff --git a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/PetApi.java b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/PetApi.java new file mode 100644 index 000000000000..c65b8d422e2d --- /dev/null +++ b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/PetApi.java @@ -0,0 +1,211 @@ +package org.openapitools.api; + +import org.openapitools.model.*; +import org.openapitools.api.PetApiService; +import org.openapitools.api.factories.PetApiServiceFactory; + +import io.swagger.annotations.ApiParam; +import io.swagger.jaxrs.*; + +import java.io.File; +import org.openapitools.model.ModelApiResponse; +import org.openapitools.model.Pet; + +import java.util.Map; +import java.util.List; +import org.openapitools.api.NotFoundException; + +import java.io.InputStream; + +import org.glassfish.jersey.media.multipart.FormDataContentDisposition; +import org.glassfish.jersey.media.multipart.FormDataParam; + +import javax.servlet.ServletConfig; +import javax.ws.rs.core.Context; +import javax.ws.rs.core.Response; +import javax.ws.rs.core.SecurityContext; +import javax.ws.rs.*; +import javax.validation.constraints.*; + +@Path("/pet") + + +@io.swagger.annotations.Api(description = "the pet API") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen", date = "2018-08-10T15:02:11.723+09:00[Asia/Tokyo]") +public class PetApi { + private final PetApiService delegate; + + public PetApi(@Context ServletConfig servletContext) { + PetApiService delegate = null; + + if (servletContext != null) { + String implClass = servletContext.getInitParameter("PetApi.implementation"); + if (implClass != null && !"".equals(implClass.trim())) { + try { + delegate = (PetApiService) Class.forName(implClass).newInstance(); + } catch (Exception e) { + throw new RuntimeException(e); + } + } + } + + if (delegate == null) { + delegate = PetApiServiceFactory.getPetApi(); + } + + this.delegate = delegate; + } + + @POST + + @Consumes({ "application/json", "application/xml" }) + + @io.swagger.annotations.ApiOperation(value = "Add a new pet to the store", notes = "", response = Void.class, authorizations = { + @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = { + @io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + }, tags={ "pet", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 405, message = "Invalid input", response = Void.class) }) + public Response addPet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true) Pet pet +,@Context SecurityContext securityContext) + throws NotFoundException { + return delegate.addPet(pet,securityContext); + } + @DELETE + @Path("/{petId}") + + + @io.swagger.annotations.ApiOperation(value = "Deletes a pet", notes = "", response = Void.class, authorizations = { + @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = { + @io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + }, tags={ "pet", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid pet value", response = Void.class) }) + public Response deletePet(@ApiParam(value = "Pet id to delete",required=true) @PathParam("petId") Long petId +,@ApiParam(value = "" )@HeaderParam("api_key") String apiKey +,@Context SecurityContext securityContext) + throws NotFoundException { + return delegate.deletePet(petId,apiKey,securityContext); + } + @GET + @Path("/findByStatus") + + @Produces({ "application/xml", "application/json" }) + @io.swagger.annotations.ApiOperation(value = "Finds Pets by status", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, responseContainer = "List", authorizations = { + @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = { + @io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + }, tags={ "pet", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), + + @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid status value", response = Void.class) }) + public Response findPetsByStatus(@ApiParam(value = "Status values that need to be considered for filter",required=true, allowableValues="available, pending, sold") @QueryParam("status") List status +,@Context SecurityContext securityContext) + throws NotFoundException { + return delegate.findPetsByStatus(status,securityContext); + } + @GET + @Path("/findByTags") + + @Produces({ "application/xml", "application/json" }) + @io.swagger.annotations.ApiOperation(value = "Finds Pets by tags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, responseContainer = "List", authorizations = { + @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = { + @io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + }, tags={ "pet", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), + + @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid tag value", response = Void.class) }) + public Response findPetsByTags(@ApiParam(value = "Tags to filter by",required=true) @QueryParam("tags") List tags +,@Context SecurityContext securityContext) + throws NotFoundException { + return delegate.findPetsByTags(tags,securityContext); + } + @GET + @Path("/{petId}") + + @Produces({ "application/xml", "application/json" }) + @io.swagger.annotations.ApiOperation(value = "Find pet by ID", notes = "Returns a single pet", response = Pet.class, authorizations = { + @io.swagger.annotations.Authorization(value = "api_key") + }, tags={ "pet", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class), + + @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class), + + @io.swagger.annotations.ApiResponse(code = 404, message = "Pet not found", response = Void.class) }) + public Response getPetById(@ApiParam(value = "ID of pet to return",required=true) @PathParam("petId") Long petId +,@Context SecurityContext securityContext) + throws NotFoundException { + return delegate.getPetById(petId,securityContext); + } + @PUT + + @Consumes({ "application/json", "application/xml" }) + + @io.swagger.annotations.ApiOperation(value = "Update an existing pet", notes = "", response = Void.class, authorizations = { + @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = { + @io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + }, tags={ "pet", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class), + + @io.swagger.annotations.ApiResponse(code = 404, message = "Pet not found", response = Void.class), + + @io.swagger.annotations.ApiResponse(code = 405, message = "Validation exception", response = Void.class) }) + public Response updatePet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true) Pet pet +,@Context SecurityContext securityContext) + throws NotFoundException { + return delegate.updatePet(pet,securityContext); + } + @POST + @Path("/{petId}") + @Consumes({ "application/x-www-form-urlencoded" }) + + @io.swagger.annotations.ApiOperation(value = "Updates a pet in the store with form data", notes = "", response = Void.class, authorizations = { + @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = { + @io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + }, tags={ "pet", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 405, message = "Invalid input", response = Void.class) }) + public Response updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated",required=true) @PathParam("petId") Long petId +,@ApiParam(value = "Updated name of the pet", defaultValue="null") @DefaultValue("null") @FormParam("name") String name +,@ApiParam(value = "Updated status of the pet", defaultValue="null") @DefaultValue("null") @FormParam("status") String status +,@Context SecurityContext securityContext) + throws NotFoundException { + return delegate.updatePetWithForm(petId,name,status,securityContext); + } + @POST + @Path("/{petId}/uploadImage") + @Consumes({ "multipart/form-data" }) + @Produces({ "application/json" }) + @io.swagger.annotations.ApiOperation(value = "uploads an image", notes = "", response = ModelApiResponse.class, authorizations = { + @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = { + @io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + }, tags={ "pet", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) + public Response uploadFile(@ApiParam(value = "ID of pet to update",required=true) @PathParam("petId") Long petId +,@ApiParam(value = "Additional data to pass to server", defaultValue="null")@FormDataParam("additionalMetadata") String additionalMetadata +, + @FormDataParam("file") InputStream fileInputStream, + @FormDataParam("file") FormDataContentDisposition fileDetail +,@Context SecurityContext securityContext) + throws NotFoundException { + return delegate.uploadFile(petId,additionalMetadata,fileInputStream, fileDetail,securityContext); + } +} diff --git a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/PetApiService.java b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/PetApiService.java new file mode 100644 index 000000000000..95bf11d9b092 --- /dev/null +++ b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/PetApiService.java @@ -0,0 +1,30 @@ +package org.openapitools.api; + +import org.openapitools.api.*; +import org.openapitools.model.*; + +import org.glassfish.jersey.media.multipart.FormDataContentDisposition; + +import java.io.File; +import org.openapitools.model.ModelApiResponse; +import org.openapitools.model.Pet; + +import java.util.List; +import org.openapitools.api.NotFoundException; + +import java.io.InputStream; + +import javax.ws.rs.core.Response; +import javax.ws.rs.core.SecurityContext; +import javax.validation.constraints.*; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen", date = "2018-08-10T15:02:11.723+09:00[Asia/Tokyo]") +public abstract class PetApiService { + public abstract Response addPet(Pet pet,SecurityContext securityContext) throws NotFoundException; + public abstract Response deletePet(Long petId,String apiKey,SecurityContext securityContext) throws NotFoundException; + public abstract Response findPetsByStatus( @NotNull List status,SecurityContext securityContext) throws NotFoundException; + public abstract Response findPetsByTags( @NotNull List tags,SecurityContext securityContext) throws NotFoundException; + public abstract Response getPetById(Long petId,SecurityContext securityContext) throws NotFoundException; + public abstract Response updatePet(Pet pet,SecurityContext securityContext) throws NotFoundException; + public abstract Response updatePetWithForm(Long petId,String name,String status,SecurityContext securityContext) throws NotFoundException; + public abstract Response uploadFile(Long petId,String additionalMetadata,InputStream fileInputStream, FormDataContentDisposition fileDetail,SecurityContext securityContext) throws NotFoundException; +} diff --git a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/RFC3339DateFormat.java b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/RFC3339DateFormat.java new file mode 100644 index 000000000000..b471837701d9 --- /dev/null +++ b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/RFC3339DateFormat.java @@ -0,0 +1,19 @@ +package org.openapitools.api; + +import com.fasterxml.jackson.databind.util.ISO8601DateFormat; +import com.fasterxml.jackson.databind.util.ISO8601Utils; + +import java.text.FieldPosition; +import java.util.Date; + +public class RFC3339DateFormat extends ISO8601DateFormat { + + // Same as ISO8601DateFormat but serializing milliseconds. + @Override + public StringBuffer format(Date date, StringBuffer toAppendTo, FieldPosition fieldPosition) { + String value = ISO8601Utils.format(date, true); + toAppendTo.append(value); + return toAppendTo; + } + +} \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/StoreApi.java new file mode 100644 index 000000000000..d0f12395db8f --- /dev/null +++ b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/StoreApi.java @@ -0,0 +1,115 @@ +package org.openapitools.api; + +import org.openapitools.model.*; +import org.openapitools.api.StoreApiService; +import org.openapitools.api.factories.StoreApiServiceFactory; + +import io.swagger.annotations.ApiParam; +import io.swagger.jaxrs.*; + +import java.util.Map; +import org.openapitools.model.Order; + +import java.util.Map; +import java.util.List; +import org.openapitools.api.NotFoundException; + +import java.io.InputStream; + +import org.glassfish.jersey.media.multipart.FormDataContentDisposition; +import org.glassfish.jersey.media.multipart.FormDataParam; + +import javax.servlet.ServletConfig; +import javax.ws.rs.core.Context; +import javax.ws.rs.core.Response; +import javax.ws.rs.core.SecurityContext; +import javax.ws.rs.*; +import javax.validation.constraints.*; + +@Path("/store") + + +@io.swagger.annotations.Api(description = "the store API") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen", date = "2018-08-10T15:02:11.723+09:00[Asia/Tokyo]") +public class StoreApi { + private final StoreApiService delegate; + + public StoreApi(@Context ServletConfig servletContext) { + StoreApiService delegate = null; + + if (servletContext != null) { + String implClass = servletContext.getInitParameter("StoreApi.implementation"); + if (implClass != null && !"".equals(implClass.trim())) { + try { + delegate = (StoreApiService) Class.forName(implClass).newInstance(); + } catch (Exception e) { + throw new RuntimeException(e); + } + } + } + + if (delegate == null) { + delegate = StoreApiServiceFactory.getStoreApi(); + } + + this.delegate = delegate; + } + + @DELETE + @Path("/order/{orderId}") + + + @io.swagger.annotations.ApiOperation(value = "Delete purchase order by ID", notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", response = Void.class, tags={ "store", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class), + + @io.swagger.annotations.ApiResponse(code = 404, message = "Order not found", response = Void.class) }) + public Response deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted",required=true) @PathParam("orderId") String orderId +,@Context SecurityContext securityContext) + throws NotFoundException { + return delegate.deleteOrder(orderId,securityContext); + } + @GET + @Path("/inventory") + + @Produces({ "application/json" }) + @io.swagger.annotations.ApiOperation(value = "Returns pet inventories by status", notes = "Returns a map of status codes to quantities", response = Integer.class, responseContainer = "Map", authorizations = { + @io.swagger.annotations.Authorization(value = "api_key") + }, tags={ "store", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") }) + public Response getInventory(@Context SecurityContext securityContext) + throws NotFoundException { + return delegate.getInventory(securityContext); + } + @GET + @Path("/order/{orderId}") + + @Produces({ "application/xml", "application/json" }) + @io.swagger.annotations.ApiOperation(value = "Find purchase order by ID", notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", response = Order.class, tags={ "store", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Order.class), + + @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class), + + @io.swagger.annotations.ApiResponse(code = 404, message = "Order not found", response = Void.class) }) + public Response getOrderById(@ApiParam(value = "ID of pet that needs to be fetched",required=true) @PathParam("orderId") Long orderId +,@Context SecurityContext securityContext) + throws NotFoundException { + return delegate.getOrderById(orderId,securityContext); + } + @POST + @Path("/order") + @Consumes({ "application/json" }) + @Produces({ "application/xml", "application/json" }) + @io.swagger.annotations.ApiOperation(value = "Place an order for a pet", notes = "", response = Order.class, tags={ "store", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Order.class), + + @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid Order", response = Void.class) }) + public Response placeOrder(@ApiParam(value = "order placed for purchasing the pet" ,required=true) Order order +,@Context SecurityContext securityContext) + throws NotFoundException { + return delegate.placeOrder(order,securityContext); + } +} diff --git a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/StoreApiService.java b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/StoreApiService.java new file mode 100644 index 000000000000..13698d783a90 --- /dev/null +++ b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/StoreApiService.java @@ -0,0 +1,25 @@ +package org.openapitools.api; + +import org.openapitools.api.*; +import org.openapitools.model.*; + +import org.glassfish.jersey.media.multipart.FormDataContentDisposition; + +import java.util.Map; +import org.openapitools.model.Order; + +import java.util.List; +import org.openapitools.api.NotFoundException; + +import java.io.InputStream; + +import javax.ws.rs.core.Response; +import javax.ws.rs.core.SecurityContext; +import javax.validation.constraints.*; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen", date = "2018-08-10T15:02:11.723+09:00[Asia/Tokyo]") +public abstract class StoreApiService { + public abstract Response deleteOrder(String orderId,SecurityContext securityContext) throws NotFoundException; + public abstract Response getInventory(SecurityContext securityContext) throws NotFoundException; + public abstract Response getOrderById( @Min(1L) @Max(5L)Long orderId,SecurityContext securityContext) throws NotFoundException; + public abstract Response placeOrder(Order order,SecurityContext securityContext) throws NotFoundException; +} diff --git a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/StringUtil.java b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/StringUtil.java new file mode 100644 index 000000000000..8810d4383bdd --- /dev/null +++ b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/StringUtil.java @@ -0,0 +1,42 @@ +package org.openapitools.api; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen", date = "2018-08-10T15:02:11.723+09:00[Asia/Tokyo]") +public class StringUtil { + /** + * Check if the given array contains the given value (with case-insensitive comparison). + * + * @param array The array + * @param value The value to search + * @return true if the array contains the value + */ + public static boolean containsIgnoreCase(String[] array, String value) { + for (String str : array) { + if (value == null && str == null) return true; + if (value != null && value.equalsIgnoreCase(str)) return true; + } + return false; + } + + /** + * Join an array of strings with the given separator. + *

+ * Note: This might be replaced by utility method from commons-lang or guava someday + * if one of those libraries is added as dependency. + *

+ * + * @param array The array of strings + * @param separator The separator + * @return the resulting string + */ + public static String join(String[] array, String separator) { + int len = array.length; + if (len == 0) return ""; + + StringBuilder out = new StringBuilder(); + out.append(array[0]); + for (int i = 1; i < len; i++) { + out.append(separator).append(array[i]); + } + return out.toString(); + } +} diff --git a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/UserApi.java b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/UserApi.java new file mode 100644 index 000000000000..2c5625c2fe44 --- /dev/null +++ b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/UserApi.java @@ -0,0 +1,165 @@ +package org.openapitools.api; + +import org.openapitools.model.*; +import org.openapitools.api.UserApiService; +import org.openapitools.api.factories.UserApiServiceFactory; + +import io.swagger.annotations.ApiParam; +import io.swagger.jaxrs.*; + +import java.util.List; +import org.openapitools.model.User; + +import java.util.Map; +import java.util.List; +import org.openapitools.api.NotFoundException; + +import java.io.InputStream; + +import org.glassfish.jersey.media.multipart.FormDataContentDisposition; +import org.glassfish.jersey.media.multipart.FormDataParam; + +import javax.servlet.ServletConfig; +import javax.ws.rs.core.Context; +import javax.ws.rs.core.Response; +import javax.ws.rs.core.SecurityContext; +import javax.ws.rs.*; +import javax.validation.constraints.*; + +@Path("/user") + + +@io.swagger.annotations.Api(description = "the user API") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen", date = "2018-08-10T15:02:11.723+09:00[Asia/Tokyo]") +public class UserApi { + private final UserApiService delegate; + + public UserApi(@Context ServletConfig servletContext) { + UserApiService delegate = null; + + if (servletContext != null) { + String implClass = servletContext.getInitParameter("UserApi.implementation"); + if (implClass != null && !"".equals(implClass.trim())) { + try { + delegate = (UserApiService) Class.forName(implClass).newInstance(); + } catch (Exception e) { + throw new RuntimeException(e); + } + } + } + + if (delegate == null) { + delegate = UserApiServiceFactory.getUserApi(); + } + + this.delegate = delegate; + } + + @POST + + @Consumes({ "application/json" }) + + @io.swagger.annotations.ApiOperation(value = "Create user", notes = "This can only be done by the logged in user.", response = Void.class, tags={ "user", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) }) + public Response createUser(@ApiParam(value = "Created user object" ,required=true) User user +,@Context SecurityContext securityContext) + throws NotFoundException { + return delegate.createUser(user,securityContext); + } + @POST + @Path("/createWithArray") + @Consumes({ "application/json" }) + + @io.swagger.annotations.ApiOperation(value = "Creates list of users with given input array", notes = "", response = Void.class, tags={ "user", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) }) + public Response createUsersWithArrayInput(@ApiParam(value = "List of user object" ,required=true) List user +,@Context SecurityContext securityContext) + throws NotFoundException { + return delegate.createUsersWithArrayInput(user,securityContext); + } + @POST + @Path("/createWithList") + @Consumes({ "application/json" }) + + @io.swagger.annotations.ApiOperation(value = "Creates list of users with given input array", notes = "", response = Void.class, tags={ "user", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) }) + public Response createUsersWithListInput(@ApiParam(value = "List of user object" ,required=true) List user +,@Context SecurityContext securityContext) + throws NotFoundException { + return delegate.createUsersWithListInput(user,securityContext); + } + @DELETE + @Path("/{username}") + + + @io.swagger.annotations.ApiOperation(value = "Delete user", notes = "This can only be done by the logged in user.", response = Void.class, tags={ "user", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username supplied", response = Void.class), + + @io.swagger.annotations.ApiResponse(code = 404, message = "User not found", response = Void.class) }) + public Response deleteUser(@ApiParam(value = "The name that needs to be deleted",required=true) @PathParam("username") String username +,@Context SecurityContext securityContext) + throws NotFoundException { + return delegate.deleteUser(username,securityContext); + } + @GET + @Path("/{username}") + + @Produces({ "application/xml", "application/json" }) + @io.swagger.annotations.ApiOperation(value = "Get user by user name", notes = "", response = User.class, tags={ "user", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = User.class), + + @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username supplied", response = Void.class), + + @io.swagger.annotations.ApiResponse(code = 404, message = "User not found", response = Void.class) }) + public Response getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.",required=true) @PathParam("username") String username +,@Context SecurityContext securityContext) + throws NotFoundException { + return delegate.getUserByName(username,securityContext); + } + @GET + @Path("/login") + + @Produces({ "application/xml", "application/json" }) + @io.swagger.annotations.ApiOperation(value = "Logs user into the system", notes = "", response = String.class, tags={ "user", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = String.class), + + @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username/password supplied", response = Void.class) }) + public Response loginUser(@ApiParam(value = "The user name for login",required=true) @QueryParam("username") String username +,@ApiParam(value = "The password for login in clear text",required=true) @QueryParam("password") String password +,@Context SecurityContext securityContext) + throws NotFoundException { + return delegate.loginUser(username,password,securityContext); + } + @GET + @Path("/logout") + + + @io.swagger.annotations.ApiOperation(value = "Logs out current logged in user session", notes = "", response = Void.class, tags={ "user", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) }) + public Response logoutUser(@Context SecurityContext securityContext) + throws NotFoundException { + return delegate.logoutUser(securityContext); + } + @PUT + @Path("/{username}") + @Consumes({ "application/json" }) + + @io.swagger.annotations.ApiOperation(value = "Updated user", notes = "This can only be done by the logged in user.", response = Void.class, tags={ "user", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid user supplied", response = Void.class), + + @io.swagger.annotations.ApiResponse(code = 404, message = "User not found", response = Void.class) }) + public Response updateUser(@ApiParam(value = "name that need to be deleted",required=true) @PathParam("username") String username +,@ApiParam(value = "Updated user object" ,required=true) User user +,@Context SecurityContext securityContext) + throws NotFoundException { + return delegate.updateUser(username,user,securityContext); + } +} diff --git a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/UserApiService.java b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/UserApiService.java new file mode 100644 index 000000000000..e5919ae31cb8 --- /dev/null +++ b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/UserApiService.java @@ -0,0 +1,29 @@ +package org.openapitools.api; + +import org.openapitools.api.*; +import org.openapitools.model.*; + +import org.glassfish.jersey.media.multipart.FormDataContentDisposition; + +import java.util.List; +import org.openapitools.model.User; + +import java.util.List; +import org.openapitools.api.NotFoundException; + +import java.io.InputStream; + +import javax.ws.rs.core.Response; +import javax.ws.rs.core.SecurityContext; +import javax.validation.constraints.*; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen", date = "2018-08-10T15:02:11.723+09:00[Asia/Tokyo]") +public abstract class UserApiService { + public abstract Response createUser(User user,SecurityContext securityContext) throws NotFoundException; + public abstract Response createUsersWithArrayInput(List user,SecurityContext securityContext) throws NotFoundException; + public abstract Response createUsersWithListInput(List user,SecurityContext securityContext) throws NotFoundException; + public abstract Response deleteUser(String username,SecurityContext securityContext) throws NotFoundException; + public abstract Response getUserByName(String username,SecurityContext securityContext) throws NotFoundException; + public abstract Response loginUser( @NotNull String username, @NotNull String password,SecurityContext securityContext) throws NotFoundException; + public abstract Response logoutUser(SecurityContext securityContext) throws NotFoundException; + public abstract Response updateUser(String username,User user,SecurityContext securityContext) throws NotFoundException; +} diff --git a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/model/Category.java b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/model/Category.java new file mode 100644 index 000000000000..76cf0f87956c --- /dev/null +++ b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/model/Category.java @@ -0,0 +1,115 @@ +/* + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.model; + +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import javax.validation.constraints.*; + +/** + * A category for a pet + */ +@ApiModel(description = "A category for a pet") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen", date = "2018-08-10T15:02:11.723+09:00[Asia/Tokyo]") +public class Category { + @JsonProperty("id") + private Long id = null; + + @JsonProperty("name") + private String name = null; + + public Category id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @JsonProperty("id") + @ApiModelProperty(value = "") + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Category name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @JsonProperty("name") + @ApiModelProperty(value = "") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Category category = (Category) o; + return Objects.equals(this.id, category.id) && + Objects.equals(this.name, category.name); + } + + @Override + public int hashCode() { + return Objects.hash(id, name); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Category {\n"); + + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/model/ModelApiResponse.java new file mode 100644 index 000000000000..450694479018 --- /dev/null +++ b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/model/ModelApiResponse.java @@ -0,0 +1,139 @@ +/* + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.model; + +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import javax.validation.constraints.*; + +/** + * Describes the result of uploading an image resource + */ +@ApiModel(description = "Describes the result of uploading an image resource") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen", date = "2018-08-10T15:02:11.723+09:00[Asia/Tokyo]") +public class ModelApiResponse { + @JsonProperty("code") + private Integer code = null; + + @JsonProperty("type") + private String type = null; + + @JsonProperty("message") + private String message = null; + + public ModelApiResponse code(Integer code) { + this.code = code; + return this; + } + + /** + * Get code + * @return code + **/ + @JsonProperty("code") + @ApiModelProperty(value = "") + public Integer getCode() { + return code; + } + + public void setCode(Integer code) { + this.code = code; + } + + public ModelApiResponse type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @JsonProperty("type") + @ApiModelProperty(value = "") + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public ModelApiResponse message(String message) { + this.message = message; + return this; + } + + /** + * Get message + * @return message + **/ + @JsonProperty("message") + @ApiModelProperty(value = "") + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ModelApiResponse _apiResponse = (ModelApiResponse) o; + return Objects.equals(this.code, _apiResponse.code) && + Objects.equals(this.type, _apiResponse.type) && + Objects.equals(this.message, _apiResponse.message); + } + + @Override + public int hashCode() { + return Objects.hash(code, type, message); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ModelApiResponse {\n"); + + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/model/Order.java b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/model/Order.java new file mode 100644 index 000000000000..1f1c23188d18 --- /dev/null +++ b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/model/Order.java @@ -0,0 +1,246 @@ +/* + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.model; + +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.Date; +import javax.validation.constraints.*; + +/** + * An order for a pets from the pet store + */ +@ApiModel(description = "An order for a pets from the pet store") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen", date = "2018-08-10T15:02:11.723+09:00[Asia/Tokyo]") +public class Order { + @JsonProperty("id") + private Long id = null; + + @JsonProperty("petId") + private Long petId = null; + + @JsonProperty("quantity") + private Integer quantity = null; + + @JsonProperty("shipDate") + private Date shipDate = null; + + /** + * Order Status + */ + public enum StatusEnum { + PLACED("placed"), + + APPROVED("approved"), + + DELIVERED("delivered"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @Override + @JsonValue + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String text) { + for (StatusEnum b : StatusEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + text + "'"); + } + } + + @JsonProperty("status") + private StatusEnum status = null; + + @JsonProperty("complete") + private Boolean complete = false; + + public Order id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @JsonProperty("id") + @ApiModelProperty(value = "") + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Order petId(Long petId) { + this.petId = petId; + return this; + } + + /** + * Get petId + * @return petId + **/ + @JsonProperty("petId") + @ApiModelProperty(value = "") + public Long getPetId() { + return petId; + } + + public void setPetId(Long petId) { + this.petId = petId; + } + + public Order quantity(Integer quantity) { + this.quantity = quantity; + return this; + } + + /** + * Get quantity + * @return quantity + **/ + @JsonProperty("quantity") + @ApiModelProperty(value = "") + public Integer getQuantity() { + return quantity; + } + + public void setQuantity(Integer quantity) { + this.quantity = quantity; + } + + public Order shipDate(Date shipDate) { + this.shipDate = shipDate; + return this; + } + + /** + * Get shipDate + * @return shipDate + **/ + @JsonProperty("shipDate") + @ApiModelProperty(value = "") + public Date getShipDate() { + return shipDate; + } + + public void setShipDate(Date shipDate) { + this.shipDate = shipDate; + } + + public Order status(StatusEnum status) { + this.status = status; + return this; + } + + /** + * Order Status + * @return status + **/ + @JsonProperty("status") + @ApiModelProperty(value = "Order Status") + public StatusEnum getStatus() { + return status; + } + + public void setStatus(StatusEnum status) { + this.status = status; + } + + public Order complete(Boolean complete) { + this.complete = complete; + return this; + } + + /** + * Get complete + * @return complete + **/ + @JsonProperty("complete") + @ApiModelProperty(value = "") + public Boolean getComplete() { + return complete; + } + + public void setComplete(Boolean complete) { + this.complete = complete; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Order order = (Order) o; + return Objects.equals(this.id, order.id) && + Objects.equals(this.petId, order.petId) && + Objects.equals(this.quantity, order.quantity) && + Objects.equals(this.shipDate, order.shipDate) && + Objects.equals(this.status, order.status) && + Objects.equals(this.complete, order.complete); + } + + @Override + public int hashCode() { + return Objects.hash(id, petId, quantity, shipDate, status, complete); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Order {\n"); + + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); + sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); + sb.append(" shipDate: ").append(toIndentedString(shipDate)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" complete: ").append(toIndentedString(complete)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/model/Pet.java b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/model/Pet.java new file mode 100644 index 000000000000..96271292913d --- /dev/null +++ b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/model/Pet.java @@ -0,0 +1,264 @@ +/* + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.model; + +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.model.Category; +import org.openapitools.model.Tag; +import javax.validation.constraints.*; + +/** + * A pet for sale in the pet store + */ +@ApiModel(description = "A pet for sale in the pet store") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen", date = "2018-08-10T15:02:11.723+09:00[Asia/Tokyo]") +public class Pet { + @JsonProperty("id") + private Long id = null; + + @JsonProperty("category") + private Category category = null; + + @JsonProperty("name") + private String name = null; + + @JsonProperty("photoUrls") + private List photoUrls = new ArrayList(); + + @JsonProperty("tags") + private List tags = null; + + /** + * pet status in the store + */ + public enum StatusEnum { + AVAILABLE("available"), + + PENDING("pending"), + + SOLD("sold"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @Override + @JsonValue + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String text) { + for (StatusEnum b : StatusEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + text + "'"); + } + } + + @JsonProperty("status") + private StatusEnum status = null; + + public Pet id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @JsonProperty("id") + @ApiModelProperty(value = "") + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Pet category(Category category) { + this.category = category; + return this; + } + + /** + * Get category + * @return category + **/ + @JsonProperty("category") + @ApiModelProperty(value = "") + public Category getCategory() { + return category; + } + + public void setCategory(Category category) { + this.category = category; + } + + public Pet name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @JsonProperty("name") + @ApiModelProperty(example = "doggie", required = true, value = "") + @NotNull + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public Pet photoUrls(List photoUrls) { + this.photoUrls = photoUrls; + return this; + } + + public Pet addPhotoUrlsItem(String photoUrlsItem) { + this.photoUrls.add(photoUrlsItem); + return this; + } + + /** + * Get photoUrls + * @return photoUrls + **/ + @JsonProperty("photoUrls") + @ApiModelProperty(required = true, value = "") + @NotNull + public List getPhotoUrls() { + return photoUrls; + } + + public void setPhotoUrls(List photoUrls) { + this.photoUrls = photoUrls; + } + + public Pet tags(List tags) { + this.tags = tags; + return this; + } + + public Pet addTagsItem(Tag tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList(); + } + this.tags.add(tagsItem); + return this; + } + + /** + * Get tags + * @return tags + **/ + @JsonProperty("tags") + @ApiModelProperty(value = "") + public List getTags() { + return tags; + } + + public void setTags(List tags) { + this.tags = tags; + } + + public Pet status(StatusEnum status) { + this.status = status; + return this; + } + + /** + * pet status in the store + * @return status + **/ + @JsonProperty("status") + @ApiModelProperty(value = "pet status in the store") + public StatusEnum getStatus() { + return status; + } + + public void setStatus(StatusEnum status) { + this.status = status; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Pet pet = (Pet) o; + return Objects.equals(this.id, pet.id) && + Objects.equals(this.category, pet.category) && + Objects.equals(this.name, pet.name) && + Objects.equals(this.photoUrls, pet.photoUrls) && + Objects.equals(this.tags, pet.tags) && + Objects.equals(this.status, pet.status); + } + + @Override + public int hashCode() { + return Objects.hash(id, category, name, photoUrls, tags, status); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Pet {\n"); + + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" category: ").append(toIndentedString(category)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" photoUrls: ").append(toIndentedString(photoUrls)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/model/Tag.java b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/model/Tag.java new file mode 100644 index 000000000000..5d78706d8f49 --- /dev/null +++ b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/model/Tag.java @@ -0,0 +1,115 @@ +/* + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.model; + +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import javax.validation.constraints.*; + +/** + * A tag for a pet + */ +@ApiModel(description = "A tag for a pet") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen", date = "2018-08-10T15:02:11.723+09:00[Asia/Tokyo]") +public class Tag { + @JsonProperty("id") + private Long id = null; + + @JsonProperty("name") + private String name = null; + + public Tag id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @JsonProperty("id") + @ApiModelProperty(value = "") + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Tag name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @JsonProperty("name") + @ApiModelProperty(value = "") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Tag tag = (Tag) o; + return Objects.equals(this.id, tag.id) && + Objects.equals(this.name, tag.name); + } + + @Override + public int hashCode() { + return Objects.hash(id, name); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Tag {\n"); + + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/model/User.java b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/model/User.java new file mode 100644 index 000000000000..3709c0505088 --- /dev/null +++ b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/model/User.java @@ -0,0 +1,259 @@ +/* + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.model; + +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import javax.validation.constraints.*; + +/** + * A User who is purchasing from the pet store + */ +@ApiModel(description = "A User who is purchasing from the pet store") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen", date = "2018-08-10T15:02:11.723+09:00[Asia/Tokyo]") +public class User { + @JsonProperty("id") + private Long id = null; + + @JsonProperty("username") + private String username = null; + + @JsonProperty("firstName") + private String firstName = null; + + @JsonProperty("lastName") + private String lastName = null; + + @JsonProperty("email") + private String email = null; + + @JsonProperty("password") + private String password = null; + + @JsonProperty("phone") + private String phone = null; + + @JsonProperty("userStatus") + private Integer userStatus = null; + + public User id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @JsonProperty("id") + @ApiModelProperty(value = "") + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public User username(String username) { + this.username = username; + return this; + } + + /** + * Get username + * @return username + **/ + @JsonProperty("username") + @ApiModelProperty(value = "") + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public User firstName(String firstName) { + this.firstName = firstName; + return this; + } + + /** + * Get firstName + * @return firstName + **/ + @JsonProperty("firstName") + @ApiModelProperty(value = "") + public String getFirstName() { + return firstName; + } + + public void setFirstName(String firstName) { + this.firstName = firstName; + } + + public User lastName(String lastName) { + this.lastName = lastName; + return this; + } + + /** + * Get lastName + * @return lastName + **/ + @JsonProperty("lastName") + @ApiModelProperty(value = "") + public String getLastName() { + return lastName; + } + + public void setLastName(String lastName) { + this.lastName = lastName; + } + + public User email(String email) { + this.email = email; + return this; + } + + /** + * Get email + * @return email + **/ + @JsonProperty("email") + @ApiModelProperty(value = "") + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + public User password(String password) { + this.password = password; + return this; + } + + /** + * Get password + * @return password + **/ + @JsonProperty("password") + @ApiModelProperty(value = "") + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public User phone(String phone) { + this.phone = phone; + return this; + } + + /** + * Get phone + * @return phone + **/ + @JsonProperty("phone") + @ApiModelProperty(value = "") + public String getPhone() { + return phone; + } + + public void setPhone(String phone) { + this.phone = phone; + } + + public User userStatus(Integer userStatus) { + this.userStatus = userStatus; + return this; + } + + /** + * User Status + * @return userStatus + **/ + @JsonProperty("userStatus") + @ApiModelProperty(value = "User Status") + public Integer getUserStatus() { + return userStatus; + } + + public void setUserStatus(Integer userStatus) { + this.userStatus = userStatus; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + User user = (User) o; + return Objects.equals(this.id, user.id) && + Objects.equals(this.username, user.username) && + Objects.equals(this.firstName, user.firstName) && + Objects.equals(this.lastName, user.lastName) && + Objects.equals(this.email, user.email) && + Objects.equals(this.password, user.password) && + Objects.equals(this.phone, user.phone) && + Objects.equals(this.userStatus, user.userStatus); + } + + @Override + public int hashCode() { + return Objects.hash(id, username, firstName, lastName, email, password, phone, userStatus); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class User {\n"); + + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" username: ").append(toIndentedString(username)).append("\n"); + sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); + sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); + sb.append(" userStatus: ").append(toIndentedString(userStatus)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/server/petstore/jaxrs-jersey/src/main/java/org/openapitools/api/Bootstrap.java b/samples/server/petstore/jaxrs-jersey/src/main/java/org/openapitools/api/Bootstrap.java new file mode 100644 index 000000000000..2856cda2f37a --- /dev/null +++ b/samples/server/petstore/jaxrs-jersey/src/main/java/org/openapitools/api/Bootstrap.java @@ -0,0 +1,31 @@ +package org.openapitools.api; + +import io.swagger.jaxrs.config.SwaggerContextService; +import io.swagger.models.*; + +import io.swagger.models.auth.*; + +import javax.servlet.http.HttpServlet; +import javax.servlet.ServletContext; +import javax.servlet.ServletConfig; +import javax.servlet.ServletException; + +public class Bootstrap extends HttpServlet { + @Override + public void init(ServletConfig config) throws ServletException { + Info info = new Info() + .title("OpenAPI Server") + .description("This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.") + .termsOfService("") + .contact(new Contact() + .email("")) + .license(new License() + .name("Apache-2.0") + .url("http://www.apache.org/licenses/LICENSE-2.0.html")); + + ServletContext context = config.getServletContext(); + Swagger swagger = new Swagger().info(info); + + new SwaggerContextService().withServletConfig(config).updateSwagger(swagger); + } +} diff --git a/samples/server/petstore/jaxrs-jersey/src/main/java/org/openapitools/api/factories/PetApiServiceFactory.java b/samples/server/petstore/jaxrs-jersey/src/main/java/org/openapitools/api/factories/PetApiServiceFactory.java new file mode 100644 index 000000000000..5bd95e5f1c09 --- /dev/null +++ b/samples/server/petstore/jaxrs-jersey/src/main/java/org/openapitools/api/factories/PetApiServiceFactory.java @@ -0,0 +1,13 @@ +package org.openapitools.api.factories; + +import org.openapitools.api.PetApiService; +import org.openapitools.api.impl.PetApiServiceImpl; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen", date = "2018-08-10T15:02:11.723+09:00[Asia/Tokyo]") +public class PetApiServiceFactory { + private final static PetApiService service = new PetApiServiceImpl(); + + public static PetApiService getPetApi() { + return service; + } +} diff --git a/samples/server/petstore/jaxrs-jersey/src/main/java/org/openapitools/api/factories/StoreApiServiceFactory.java b/samples/server/petstore/jaxrs-jersey/src/main/java/org/openapitools/api/factories/StoreApiServiceFactory.java new file mode 100644 index 000000000000..3a9ab3531aff --- /dev/null +++ b/samples/server/petstore/jaxrs-jersey/src/main/java/org/openapitools/api/factories/StoreApiServiceFactory.java @@ -0,0 +1,13 @@ +package org.openapitools.api.factories; + +import org.openapitools.api.StoreApiService; +import org.openapitools.api.impl.StoreApiServiceImpl; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen", date = "2018-08-10T15:02:11.723+09:00[Asia/Tokyo]") +public class StoreApiServiceFactory { + private final static StoreApiService service = new StoreApiServiceImpl(); + + public static StoreApiService getStoreApi() { + return service; + } +} diff --git a/samples/server/petstore/jaxrs-jersey/src/main/java/org/openapitools/api/factories/UserApiServiceFactory.java b/samples/server/petstore/jaxrs-jersey/src/main/java/org/openapitools/api/factories/UserApiServiceFactory.java new file mode 100644 index 000000000000..12540d9364c1 --- /dev/null +++ b/samples/server/petstore/jaxrs-jersey/src/main/java/org/openapitools/api/factories/UserApiServiceFactory.java @@ -0,0 +1,13 @@ +package org.openapitools.api.factories; + +import org.openapitools.api.UserApiService; +import org.openapitools.api.impl.UserApiServiceImpl; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen", date = "2018-08-10T15:02:11.723+09:00[Asia/Tokyo]") +public class UserApiServiceFactory { + private final static UserApiService service = new UserApiServiceImpl(); + + public static UserApiService getUserApi() { + return service; + } +} diff --git a/samples/server/petstore/jaxrs-jersey/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java b/samples/server/petstore/jaxrs-jersey/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java new file mode 100644 index 000000000000..3ef3488fe8ff --- /dev/null +++ b/samples/server/petstore/jaxrs-jersey/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java @@ -0,0 +1,62 @@ +package org.openapitools.api.impl; + +import org.openapitools.api.*; +import org.openapitools.model.*; + +import java.io.File; +import org.openapitools.model.ModelApiResponse; +import org.openapitools.model.Pet; + +import java.util.List; +import org.openapitools.api.NotFoundException; + +import java.io.InputStream; + +import org.glassfish.jersey.media.multipart.FormDataContentDisposition; + +import javax.ws.rs.core.Response; +import javax.ws.rs.core.SecurityContext; +import javax.validation.constraints.*; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen", date = "2018-08-10T15:02:11.723+09:00[Asia/Tokyo]") +public class PetApiServiceImpl extends PetApiService { + @Override + public Response addPet(Pet pet, SecurityContext securityContext) throws NotFoundException { + // do some magic! + return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); + } + @Override + public Response deletePet(Long petId, String apiKey, SecurityContext securityContext) throws NotFoundException { + // do some magic! + return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); + } + @Override + public Response findPetsByStatus( @NotNull List status, SecurityContext securityContext) throws NotFoundException { + // do some magic! + return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); + } + @Override + public Response findPetsByTags( @NotNull List tags, SecurityContext securityContext) throws NotFoundException { + // do some magic! + return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); + } + @Override + public Response getPetById(Long petId, SecurityContext securityContext) throws NotFoundException { + // do some magic! + return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); + } + @Override + public Response updatePet(Pet pet, SecurityContext securityContext) throws NotFoundException { + // do some magic! + return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); + } + @Override + public Response updatePetWithForm(Long petId, String name, String status, SecurityContext securityContext) throws NotFoundException { + // do some magic! + return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); + } + @Override + public Response uploadFile(Long petId, String additionalMetadata, InputStream fileInputStream, FormDataContentDisposition fileDetail, SecurityContext securityContext) throws NotFoundException { + // do some magic! + return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); + } +} diff --git a/samples/server/petstore/jaxrs-jersey/src/main/java/org/openapitools/api/impl/StoreApiServiceImpl.java b/samples/server/petstore/jaxrs-jersey/src/main/java/org/openapitools/api/impl/StoreApiServiceImpl.java new file mode 100644 index 000000000000..b4be886cf0cb --- /dev/null +++ b/samples/server/petstore/jaxrs-jersey/src/main/java/org/openapitools/api/impl/StoreApiServiceImpl.java @@ -0,0 +1,41 @@ +package org.openapitools.api.impl; + +import org.openapitools.api.*; +import org.openapitools.model.*; + +import java.util.Map; +import org.openapitools.model.Order; + +import java.util.List; +import org.openapitools.api.NotFoundException; + +import java.io.InputStream; + +import org.glassfish.jersey.media.multipart.FormDataContentDisposition; + +import javax.ws.rs.core.Response; +import javax.ws.rs.core.SecurityContext; +import javax.validation.constraints.*; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen", date = "2018-08-10T15:02:11.723+09:00[Asia/Tokyo]") +public class StoreApiServiceImpl extends StoreApiService { + @Override + public Response deleteOrder(String orderId, SecurityContext securityContext) throws NotFoundException { + // do some magic! + return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); + } + @Override + public Response getInventory(SecurityContext securityContext) throws NotFoundException { + // do some magic! + return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); + } + @Override + public Response getOrderById( @Min(1L) @Max(5L)Long orderId, SecurityContext securityContext) throws NotFoundException { + // do some magic! + return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); + } + @Override + public Response placeOrder(Order order, SecurityContext securityContext) throws NotFoundException { + // do some magic! + return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); + } +} diff --git a/samples/server/petstore/jaxrs-jersey/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java b/samples/server/petstore/jaxrs-jersey/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java new file mode 100644 index 000000000000..fb2e323efc6f --- /dev/null +++ b/samples/server/petstore/jaxrs-jersey/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java @@ -0,0 +1,61 @@ +package org.openapitools.api.impl; + +import org.openapitools.api.*; +import org.openapitools.model.*; + +import java.util.List; +import org.openapitools.model.User; + +import java.util.List; +import org.openapitools.api.NotFoundException; + +import java.io.InputStream; + +import org.glassfish.jersey.media.multipart.FormDataContentDisposition; + +import javax.ws.rs.core.Response; +import javax.ws.rs.core.SecurityContext; +import javax.validation.constraints.*; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen", date = "2018-08-10T15:02:11.723+09:00[Asia/Tokyo]") +public class UserApiServiceImpl extends UserApiService { + @Override + public Response createUser(User user, SecurityContext securityContext) throws NotFoundException { + // do some magic! + return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); + } + @Override + public Response createUsersWithArrayInput(List user, SecurityContext securityContext) throws NotFoundException { + // do some magic! + return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); + } + @Override + public Response createUsersWithListInput(List user, SecurityContext securityContext) throws NotFoundException { + // do some magic! + return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); + } + @Override + public Response deleteUser(String username, SecurityContext securityContext) throws NotFoundException { + // do some magic! + return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); + } + @Override + public Response getUserByName(String username, SecurityContext securityContext) throws NotFoundException { + // do some magic! + return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); + } + @Override + public Response loginUser( @NotNull String username, @NotNull String password, SecurityContext securityContext) throws NotFoundException { + // do some magic! + return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); + } + @Override + public Response logoutUser(SecurityContext securityContext) throws NotFoundException { + // do some magic! + return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); + } + @Override + public Response updateUser(String username, User user, SecurityContext securityContext) throws NotFoundException { + // do some magic! + return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); + } +} diff --git a/samples/server/petstore/jaxrs-jersey/src/main/webapp/WEB-INF/web.xml b/samples/server/petstore/jaxrs-jersey/src/main/webapp/WEB-INF/web.xml new file mode 100644 index 000000000000..78aae0f44248 --- /dev/null +++ b/samples/server/petstore/jaxrs-jersey/src/main/webapp/WEB-INF/web.xml @@ -0,0 +1,63 @@ + + + + + jersey + org.glassfish.jersey.servlet.ServletContainer + + jersey.config.server.provider.packages + + io.swagger.jaxrs.listing, + io.swagger.sample.resource, + org.openapitools.api + + + + jersey.config.server.provider.classnames + org.glassfish.jersey.media.multipart.MultiPartFeature + + + jersey.config.server.wadl.disableWadl + true + + 1 + + + + Jersey2Config + io.swagger.jersey.config.JerseyJaxrsConfig + + api.version + 1.0.0 + + + swagger.api.title + OpenAPI Server + + + swagger.api.basepath + http://petstore.swagger.io/v2 + + + 2 + + + Bootstrap + org.openapitools.api.Bootstrap + 2 + + + jersey + /v2/* + + + ApiOriginFilter + org.openapitools.api.ApiOriginFilter + + + ApiOriginFilter + /* + + From afdef8f890f0f7649656f6f014cf1281a9316bd1 Mon Sep 17 00:00:00 2001 From: Yusuke Iinuma Date: Fri, 10 Aug 2018 18:25:22 +0900 Subject: [PATCH 10/27] [Ruby] Fix method split (#780) * Fix methods split for readable * Recreate sample --- .../src/main/resources/ruby-client/api.mustache | 1 + .../client/petstore/ruby/.openapi-generator/VERSION | 2 +- samples/client/petstore/ruby/lib/petstore.rb | 2 +- .../ruby/lib/petstore/api/another_fake_api.rb | 3 ++- .../petstore/ruby/lib/petstore/api/fake_api.rb | 13 ++++++++++++- .../lib/petstore/api/fake_classname_tags123_api.rb | 3 ++- .../petstore/ruby/lib/petstore/api/pet_api.rb | 11 ++++++++++- .../petstore/ruby/lib/petstore/api/store_api.rb | 6 +++++- .../petstore/ruby/lib/petstore/api/user_api.rb | 10 +++++++++- .../client/petstore/ruby/lib/petstore/api_client.rb | 2 +- .../client/petstore/ruby/lib/petstore/api_error.rb | 2 +- .../petstore/ruby/lib/petstore/configuration.rb | 2 +- .../petstore/models/additional_properties_class.rb | 2 +- .../petstore/ruby/lib/petstore/models/animal.rb | 2 +- .../ruby/lib/petstore/models/animal_farm.rb | 2 +- .../ruby/lib/petstore/models/api_response.rb | 2 +- .../models/array_of_array_of_number_only.rb | 2 +- .../lib/petstore/models/array_of_number_only.rb | 2 +- .../petstore/ruby/lib/petstore/models/array_test.rb | 2 +- .../ruby/lib/petstore/models/capitalization.rb | 2 +- .../client/petstore/ruby/lib/petstore/models/cat.rb | 2 +- .../petstore/ruby/lib/petstore/models/category.rb | 2 +- .../ruby/lib/petstore/models/class_model.rb | 2 +- .../petstore/ruby/lib/petstore/models/client.rb | 2 +- .../client/petstore/ruby/lib/petstore/models/dog.rb | 2 +- .../ruby/lib/petstore/models/enum_arrays.rb | 2 +- .../petstore/ruby/lib/petstore/models/enum_class.rb | 2 +- .../petstore/ruby/lib/petstore/models/enum_test.rb | 2 +- .../petstore/ruby/lib/petstore/models/file.rb | 2 +- .../lib/petstore/models/file_schema_test_class.rb | 2 +- .../ruby/lib/petstore/models/format_test.rb | 2 +- .../ruby/lib/petstore/models/has_only_read_only.rb | 2 +- .../petstore/ruby/lib/petstore/models/list.rb | 2 +- .../petstore/ruby/lib/petstore/models/map_test.rb | 2 +- ...ed_properties_and_additional_properties_class.rb | 2 +- .../ruby/lib/petstore/models/model200_response.rb | 2 +- .../ruby/lib/petstore/models/model_return.rb | 2 +- .../petstore/ruby/lib/petstore/models/name.rb | 2 +- .../ruby/lib/petstore/models/number_only.rb | 2 +- .../petstore/ruby/lib/petstore/models/order.rb | 2 +- .../ruby/lib/petstore/models/outer_composite.rb | 2 +- .../petstore/ruby/lib/petstore/models/outer_enum.rb | 2 +- .../client/petstore/ruby/lib/petstore/models/pet.rb | 2 +- .../ruby/lib/petstore/models/read_only_first.rb | 2 +- .../ruby/lib/petstore/models/special_model_name.rb | 2 +- .../ruby/lib/petstore/models/string_boolean_map.rb | 2 +- .../client/petstore/ruby/lib/petstore/models/tag.rb | 2 +- .../petstore/ruby/lib/petstore/models/user.rb | 2 +- .../client/petstore/ruby/lib/petstore/version.rb | 2 +- samples/client/petstore/ruby/petstore.gemspec | 2 +- 50 files changed, 84 insertions(+), 49 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/ruby-client/api.mustache b/modules/openapi-generator/src/main/resources/ruby-client/api.mustache index aef0fbb24c99..b65c0578a175 100644 --- a/modules/openapi-generator/src/main/resources/ruby-client/api.mustache +++ b/modules/openapi-generator/src/main/resources/ruby-client/api.mustache @@ -186,6 +186,7 @@ module {{moduleName}} end return data, status_code, headers end + {{/operation}} end {{/operations}} diff --git a/samples/client/petstore/ruby/.openapi-generator/VERSION b/samples/client/petstore/ruby/.openapi-generator/VERSION index 4395ff592326..14900cee60e8 100644 --- a/samples/client/petstore/ruby/.openapi-generator/VERSION +++ b/samples/client/petstore/ruby/.openapi-generator/VERSION @@ -1 +1 @@ -3.2.0-SNAPSHOT \ No newline at end of file +3.2.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/ruby/lib/petstore.rb b/samples/client/petstore/ruby/lib/petstore.rb index 05a72419f3bb..fb9522a24ca6 100644 --- a/samples/client/petstore/ruby/lib/petstore.rb +++ b/samples/client/petstore/ruby/lib/petstore.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.2.0-SNAPSHOT +OpenAPI Generator version: 3.2.1-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/api/another_fake_api.rb b/samples/client/petstore/ruby/lib/petstore/api/another_fake_api.rb index 7d5554a463cb..631a32a42dcb 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/another_fake_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/another_fake_api.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.2.0-SNAPSHOT +OpenAPI Generator version: 3.2.1-SNAPSHOT =end @@ -73,5 +73,6 @@ module Petstore end return data, status_code, headers end + end end diff --git a/samples/client/petstore/ruby/lib/petstore/api/fake_api.rb b/samples/client/petstore/ruby/lib/petstore/api/fake_api.rb index 5a79040d9077..73202e75325d 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/fake_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/fake_api.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.2.0-SNAPSHOT +OpenAPI Generator version: 3.2.1-SNAPSHOT =end @@ -65,6 +65,7 @@ module Petstore end return data, status_code, headers end + # Test serialization of object with outer number type # @param [Hash] opts the optional parameters # @option opts [OuterComposite] :outer_composite Input composite as post body @@ -111,6 +112,7 @@ module Petstore end return data, status_code, headers end + # Test serialization of outer number types # @param [Hash] opts the optional parameters # @option opts [Float] :body Input number as post body @@ -157,6 +159,7 @@ module Petstore end return data, status_code, headers end + # Test serialization of outer string types # @param [Hash] opts the optional parameters # @option opts [String] :body Input string as post body @@ -203,6 +206,7 @@ module Petstore end return data, status_code, headers end + # For this test, the body for this request much reference a schema named `File`. # @param file_schema_test_class # @param [Hash] opts the optional parameters @@ -252,6 +256,7 @@ module Petstore end return data, status_code, headers end + # @param query # @param user # @param [Hash] opts the optional parameters @@ -306,6 +311,7 @@ module Petstore end return data, status_code, headers end + # To test \"client\" model # To test \"client\" model # @param client client model @@ -360,6 +366,7 @@ module Petstore end return data, status_code, headers end + # Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 # Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 # @param number None @@ -515,6 +522,7 @@ module Petstore end return data, status_code, headers end + # To test enum parameters # To test enum parameters # @param [Hash] opts the optional parameters @@ -608,6 +616,7 @@ module Petstore end return data, status_code, headers end + # test inline additionalProperties # @param request_body request body # @param [Hash] opts the optional parameters @@ -657,6 +666,7 @@ module Petstore end return data, status_code, headers end + # test json serialization of form data # @param param field1 # @param param2 field2 @@ -714,5 +724,6 @@ module Petstore end return data, status_code, headers end + end end diff --git a/samples/client/petstore/ruby/lib/petstore/api/fake_classname_tags123_api.rb b/samples/client/petstore/ruby/lib/petstore/api/fake_classname_tags123_api.rb index 9727790a40f5..673879cf0769 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/fake_classname_tags123_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/fake_classname_tags123_api.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.2.0-SNAPSHOT +OpenAPI Generator version: 3.2.1-SNAPSHOT =end @@ -73,5 +73,6 @@ module Petstore end return data, status_code, headers end + end end diff --git a/samples/client/petstore/ruby/lib/petstore/api/pet_api.rb b/samples/client/petstore/ruby/lib/petstore/api/pet_api.rb index 2d5cce8d7224..ba02b06905d7 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/pet_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/pet_api.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.2.0-SNAPSHOT +OpenAPI Generator version: 3.2.1-SNAPSHOT =end @@ -68,6 +68,7 @@ module Petstore end return data, status_code, headers end + # Deletes a pet # @param pet_id Pet id to delete # @param [Hash] opts the optional parameters @@ -118,6 +119,7 @@ module Petstore end return data, status_code, headers end + # Finds Pets by status # Multiple status values can be provided with comma separated strings # @param status Status values that need to be considered for filter @@ -171,6 +173,7 @@ module Petstore end return data, status_code, headers end + # Finds Pets by tags # Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. # @param tags Tags to filter by @@ -224,6 +227,7 @@ module Petstore end return data, status_code, headers end + # Find pet by ID # Returns a single pet # @param pet_id ID of pet to return @@ -276,6 +280,7 @@ module Petstore end return data, status_code, headers end + # Update an existing pet # @param pet Pet object that needs to be added to the store # @param [Hash] opts the optional parameters @@ -325,6 +330,7 @@ module Petstore end return data, status_code, headers end + # Updates a pet in the store with form data # @param pet_id ID of pet that needs to be updated # @param [Hash] opts the optional parameters @@ -380,6 +386,7 @@ module Petstore end return data, status_code, headers end + # uploads an image # @param pet_id ID of pet to update # @param [Hash] opts the optional parameters @@ -438,6 +445,7 @@ module Petstore end return data, status_code, headers end + # uploads an image (required) # @param pet_id ID of pet to update # @param required_file file to upload @@ -500,5 +508,6 @@ module Petstore end return data, status_code, headers end + end end diff --git a/samples/client/petstore/ruby/lib/petstore/api/store_api.rb b/samples/client/petstore/ruby/lib/petstore/api/store_api.rb index d282fcc7a979..40e2658140f7 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/store_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/store_api.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.2.0-SNAPSHOT +OpenAPI Generator version: 3.2.1-SNAPSHOT =end @@ -68,6 +68,7 @@ module Petstore end return data, status_code, headers end + # Returns pet inventories by status # Returns a map of status codes to quantities # @param [Hash] opts the optional parameters @@ -114,6 +115,7 @@ module Petstore end return data, status_code, headers end + # Find purchase order by ID # For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions # @param order_id ID of pet that needs to be fetched @@ -174,6 +176,7 @@ module Petstore end return data, status_code, headers end + # Place an order for a pet # @param order order placed for purchasing the pet # @param [Hash] opts the optional parameters @@ -224,5 +227,6 @@ module Petstore end return data, status_code, headers end + end end diff --git a/samples/client/petstore/ruby/lib/petstore/api/user_api.rb b/samples/client/petstore/ruby/lib/petstore/api/user_api.rb index 17d7fb77cd88..9a51c874d24d 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/user_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/user_api.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.2.0-SNAPSHOT +OpenAPI Generator version: 3.2.1-SNAPSHOT =end @@ -68,6 +68,7 @@ module Petstore end return data, status_code, headers end + # Creates list of users with given input array # @param user List of user object # @param [Hash] opts the optional parameters @@ -115,6 +116,7 @@ module Petstore end return data, status_code, headers end + # Creates list of users with given input array # @param user List of user object # @param [Hash] opts the optional parameters @@ -162,6 +164,7 @@ module Petstore end return data, status_code, headers end + # Delete user # This can only be done by the logged in user. # @param username The name that needs to be deleted @@ -211,6 +214,7 @@ module Petstore end return data, status_code, headers end + # Get user by user name # @param username The name that needs to be fetched. Use user1 for testing. # @param [Hash] opts the optional parameters @@ -261,6 +265,7 @@ module Petstore end return data, status_code, headers end + # Logs user into the system # @param username The user name for login # @param password The password for login in clear text @@ -319,6 +324,7 @@ module Petstore end return data, status_code, headers end + # Logs out current logged in user session # @param [Hash] opts the optional parameters # @return [nil] @@ -360,6 +366,7 @@ module Petstore end return data, status_code, headers end + # Updated user # This can only be done by the logged in user. # @param username name that need to be deleted @@ -415,5 +422,6 @@ module Petstore end return data, status_code, headers end + end end diff --git a/samples/client/petstore/ruby/lib/petstore/api_client.rb b/samples/client/petstore/ruby/lib/petstore/api_client.rb index 42dbf2d7228b..06f714c0e770 100644 --- a/samples/client/petstore/ruby/lib/petstore/api_client.rb +++ b/samples/client/petstore/ruby/lib/petstore/api_client.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.2.0-SNAPSHOT +OpenAPI Generator version: 3.2.1-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/api_error.rb b/samples/client/petstore/ruby/lib/petstore/api_error.rb index 81d379ef431d..78edb8feb73f 100644 --- a/samples/client/petstore/ruby/lib/petstore/api_error.rb +++ b/samples/client/petstore/ruby/lib/petstore/api_error.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.2.0-SNAPSHOT +OpenAPI Generator version: 3.2.1-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/configuration.rb b/samples/client/petstore/ruby/lib/petstore/configuration.rb index 83427d880679..6f8132d700c8 100644 --- a/samples/client/petstore/ruby/lib/petstore/configuration.rb +++ b/samples/client/petstore/ruby/lib/petstore/configuration.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.2.0-SNAPSHOT +OpenAPI Generator version: 3.2.1-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/additional_properties_class.rb b/samples/client/petstore/ruby/lib/petstore/models/additional_properties_class.rb index ad667291191e..bea7565c37fe 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/additional_properties_class.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/additional_properties_class.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.2.0-SNAPSHOT +OpenAPI Generator version: 3.2.1-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/animal.rb b/samples/client/petstore/ruby/lib/petstore/models/animal.rb index d3a4649ccdff..f2dcfb278aa7 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/animal.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/animal.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.2.0-SNAPSHOT +OpenAPI Generator version: 3.2.1-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/animal_farm.rb b/samples/client/petstore/ruby/lib/petstore/models/animal_farm.rb index 2130ee6cf955..92776bda94fc 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/animal_farm.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/animal_farm.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.2.0-SNAPSHOT +OpenAPI Generator version: 3.2.1-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/api_response.rb b/samples/client/petstore/ruby/lib/petstore/models/api_response.rb index afb0eb293773..47613736d9e8 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/api_response.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/api_response.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.2.0-SNAPSHOT +OpenAPI Generator version: 3.2.1-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/array_of_array_of_number_only.rb b/samples/client/petstore/ruby/lib/petstore/models/array_of_array_of_number_only.rb index a28454076c92..200b1003f333 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/array_of_array_of_number_only.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/array_of_array_of_number_only.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.2.0-SNAPSHOT +OpenAPI Generator version: 3.2.1-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/array_of_number_only.rb b/samples/client/petstore/ruby/lib/petstore/models/array_of_number_only.rb index 8d21ab4c109b..b50fbb4bd61d 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/array_of_number_only.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/array_of_number_only.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.2.0-SNAPSHOT +OpenAPI Generator version: 3.2.1-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/array_test.rb b/samples/client/petstore/ruby/lib/petstore/models/array_test.rb index 5910bfa15b9d..af3061da626d 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/array_test.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/array_test.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.2.0-SNAPSHOT +OpenAPI Generator version: 3.2.1-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/capitalization.rb b/samples/client/petstore/ruby/lib/petstore/models/capitalization.rb index 032b8587bbb6..fdabd812601d 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/capitalization.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/capitalization.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.2.0-SNAPSHOT +OpenAPI Generator version: 3.2.1-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/cat.rb b/samples/client/petstore/ruby/lib/petstore/models/cat.rb index a478964603ca..129be2ccbdf1 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/cat.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/cat.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.2.0-SNAPSHOT +OpenAPI Generator version: 3.2.1-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/category.rb b/samples/client/petstore/ruby/lib/petstore/models/category.rb index 52862ce3949a..baccd2ecd07d 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/category.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/category.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.2.0-SNAPSHOT +OpenAPI Generator version: 3.2.1-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/class_model.rb b/samples/client/petstore/ruby/lib/petstore/models/class_model.rb index fad7ed3b9dbb..d5b7d848a9a2 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/class_model.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/class_model.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.2.0-SNAPSHOT +OpenAPI Generator version: 3.2.1-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/client.rb b/samples/client/petstore/ruby/lib/petstore/models/client.rb index 05c444bf0d1d..61a4bc93f0cc 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/client.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/client.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.2.0-SNAPSHOT +OpenAPI Generator version: 3.2.1-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/dog.rb b/samples/client/petstore/ruby/lib/petstore/models/dog.rb index cda0316c5c15..5628376f9570 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/dog.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/dog.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.2.0-SNAPSHOT +OpenAPI Generator version: 3.2.1-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/enum_arrays.rb b/samples/client/petstore/ruby/lib/petstore/models/enum_arrays.rb index db3871fe8696..bed06c5194c6 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/enum_arrays.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/enum_arrays.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.2.0-SNAPSHOT +OpenAPI Generator version: 3.2.1-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/enum_class.rb b/samples/client/petstore/ruby/lib/petstore/models/enum_class.rb index 0a1466f458d3..46059c246147 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/enum_class.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/enum_class.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.2.0-SNAPSHOT +OpenAPI Generator version: 3.2.1-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/enum_test.rb b/samples/client/petstore/ruby/lib/petstore/models/enum_test.rb index b685798baf37..40416289d452 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/enum_test.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/enum_test.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.2.0-SNAPSHOT +OpenAPI Generator version: 3.2.1-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/file.rb b/samples/client/petstore/ruby/lib/petstore/models/file.rb index 8809734df23b..e141d680f8f6 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/file.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/file.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.2.0-SNAPSHOT +OpenAPI Generator version: 3.2.1-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/file_schema_test_class.rb b/samples/client/petstore/ruby/lib/petstore/models/file_schema_test_class.rb index 28b5aec0dd96..4dd48acfa93c 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/file_schema_test_class.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/file_schema_test_class.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.2.0-SNAPSHOT +OpenAPI Generator version: 3.2.1-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/format_test.rb b/samples/client/petstore/ruby/lib/petstore/models/format_test.rb index 5baff8c0fab8..9f04147e823f 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/format_test.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/format_test.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.2.0-SNAPSHOT +OpenAPI Generator version: 3.2.1-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/has_only_read_only.rb b/samples/client/petstore/ruby/lib/petstore/models/has_only_read_only.rb index db0c7b908d0e..6b33d9e5504e 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/has_only_read_only.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/has_only_read_only.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.2.0-SNAPSHOT +OpenAPI Generator version: 3.2.1-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/list.rb b/samples/client/petstore/ruby/lib/petstore/models/list.rb index 4d1bca715cdd..a6d375a09b57 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/list.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/list.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.2.0-SNAPSHOT +OpenAPI Generator version: 3.2.1-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/map_test.rb b/samples/client/petstore/ruby/lib/petstore/models/map_test.rb index ccd50a40c941..40d6ce9a90d8 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/map_test.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/map_test.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.2.0-SNAPSHOT +OpenAPI Generator version: 3.2.1-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/mixed_properties_and_additional_properties_class.rb b/samples/client/petstore/ruby/lib/petstore/models/mixed_properties_and_additional_properties_class.rb index 3ac768d591c3..9666d11d1584 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/mixed_properties_and_additional_properties_class.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/mixed_properties_and_additional_properties_class.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.2.0-SNAPSHOT +OpenAPI Generator version: 3.2.1-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/model200_response.rb b/samples/client/petstore/ruby/lib/petstore/models/model200_response.rb index 50f5cfaff669..3bb679ae3c27 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/model200_response.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/model200_response.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.2.0-SNAPSHOT +OpenAPI Generator version: 3.2.1-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/model_return.rb b/samples/client/petstore/ruby/lib/petstore/models/model_return.rb index f1ac812979e9..8de1e511d6e1 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/model_return.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/model_return.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.2.0-SNAPSHOT +OpenAPI Generator version: 3.2.1-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/name.rb b/samples/client/petstore/ruby/lib/petstore/models/name.rb index 73bfd8d430e6..990d4c677519 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/name.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/name.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.2.0-SNAPSHOT +OpenAPI Generator version: 3.2.1-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/number_only.rb b/samples/client/petstore/ruby/lib/petstore/models/number_only.rb index fe163952fb2a..60a525f0b5e6 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/number_only.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/number_only.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.2.0-SNAPSHOT +OpenAPI Generator version: 3.2.1-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/order.rb b/samples/client/petstore/ruby/lib/petstore/models/order.rb index d0d9b1b0817e..2f2ec5e91454 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/order.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/order.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.2.0-SNAPSHOT +OpenAPI Generator version: 3.2.1-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/outer_composite.rb b/samples/client/petstore/ruby/lib/petstore/models/outer_composite.rb index b4fa08bd49f9..eaeeed40882b 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/outer_composite.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/outer_composite.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.2.0-SNAPSHOT +OpenAPI Generator version: 3.2.1-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/outer_enum.rb b/samples/client/petstore/ruby/lib/petstore/models/outer_enum.rb index 74c1f49d76e0..d815de0d8f4e 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/outer_enum.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/outer_enum.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.2.0-SNAPSHOT +OpenAPI Generator version: 3.2.1-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/pet.rb b/samples/client/petstore/ruby/lib/petstore/models/pet.rb index 9746124e9f6e..ceb3d9d327f2 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/pet.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/pet.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.2.0-SNAPSHOT +OpenAPI Generator version: 3.2.1-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/read_only_first.rb b/samples/client/petstore/ruby/lib/petstore/models/read_only_first.rb index 1ebf4bd71929..992bea8712e9 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/read_only_first.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/read_only_first.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.2.0-SNAPSHOT +OpenAPI Generator version: 3.2.1-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/special_model_name.rb b/samples/client/petstore/ruby/lib/petstore/models/special_model_name.rb index f8d0ee2ec75b..13ab4f67fc9c 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/special_model_name.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/special_model_name.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.2.0-SNAPSHOT +OpenAPI Generator version: 3.2.1-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/string_boolean_map.rb b/samples/client/petstore/ruby/lib/petstore/models/string_boolean_map.rb index 9ba9eae50026..2318f7e8fb09 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/string_boolean_map.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/string_boolean_map.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.2.0-SNAPSHOT +OpenAPI Generator version: 3.2.1-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/tag.rb b/samples/client/petstore/ruby/lib/petstore/models/tag.rb index 6016e32a712e..220c9848b73b 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/tag.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/tag.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.2.0-SNAPSHOT +OpenAPI Generator version: 3.2.1-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/models/user.rb b/samples/client/petstore/ruby/lib/petstore/models/user.rb index e8862b7cd641..ce1f13ae8392 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/user.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/user.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.2.0-SNAPSHOT +OpenAPI Generator version: 3.2.1-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/lib/petstore/version.rb b/samples/client/petstore/ruby/lib/petstore/version.rb index 1ee762fa978d..1f94471ed8c7 100644 --- a/samples/client/petstore/ruby/lib/petstore/version.rb +++ b/samples/client/petstore/ruby/lib/petstore/version.rb @@ -6,7 +6,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.2.0-SNAPSHOT +OpenAPI Generator version: 3.2.1-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/petstore.gemspec b/samples/client/petstore/ruby/petstore.gemspec index 786acf93baa6..a7beed1589cd 100644 --- a/samples/client/petstore/ruby/petstore.gemspec +++ b/samples/client/petstore/ruby/petstore.gemspec @@ -8,7 +8,7 @@ OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 3.2.0-SNAPSHOT +OpenAPI Generator version: 3.2.1-SNAPSHOT =end From 21777f27590672baa4ed0ba88d7c02528ba79b63 Mon Sep 17 00:00:00 2001 From: Akihito Nakano Date: Fri, 10 Aug 2018 22:50:33 +0900 Subject: [PATCH 11/27] [JavaScript] Update vulnerable dependencies (#784) * Update vulnerable dependencies * Update samples: javascript-es6 * Update samples: javascript-promise * Update samples: javascript-promise-es6 * Update samples: javascript * Update samples: petstore-security-test/javascript * Rename operationId if it starts with a number * Update samples bin/javascript-petstore.sh bin/javascript-es6-petstore.sh bin/javascript-promise-petstore.sh bin/javascript-promise-es6-petstore.sh --- .../languages/JavascriptClientCodegen.java | 7 ++ .../resources/Javascript/es6/package.mustache | 2 +- .../resources/Javascript/package.mustache | 2 +- .../javascript/.openapi-generator/VERSION | 2 +- .../javascript/README.md | 29 +++--- .../javascript/docs/FakeApi.md | 20 ++--- .../javascript/docs/ModelReturn.md | 2 +- .../javascript/git_push.sh | 2 +- .../javascript/package.json | 4 +- .../javascript/src/ApiClient.js | 30 ++++--- .../javascript/src/api/FakeApi.js | 30 +++---- .../javascript/src/index.js | 20 ++--- .../javascript/src/model/ModelReturn.js | 16 ++-- .../javascript-es6/.openapi-generator/VERSION | 2 +- .../client/petstore/javascript-es6/README.md | 9 +- .../javascript-es6/docs/AnotherFakeApi.md | 12 +-- .../petstore/javascript-es6/docs/FakeApi.md | 43 +++++++++ .../petstore/javascript-es6/docs/File.md | 8 ++ .../docs/FileSchemaTestClass.md | 9 ++ .../petstore/javascript-es6/docs/MapTest.md | 2 + .../petstore/javascript-es6/docs/PetApi.md | 52 +++++++++++ .../javascript-es6/docs/StringBooleanMap.md | 7 ++ .../petstore/javascript-es6/package.json | 2 +- .../javascript-es6/src/api/AnotherFakeApi.js | 12 +-- .../javascript-es6/src/api/FakeApi.js | 44 +++++++++ .../petstore/javascript-es6/src/api/PetApi.js | 56 ++++++++++++ .../petstore/javascript-es6/src/index.js | 21 +++++ .../petstore/javascript-es6/src/model/File.js | 73 +++++++++++++++ .../src/model/FileSchemaTestClass.js | 79 ++++++++++++++++ .../javascript-es6/src/model/MapTest.js | 17 ++++ .../src/model/OuterComposite.js | 6 +- .../src/model/StringBooleanMap.js | 67 ++++++++++++++ .../javascript-es6/test/model/File.spec.js | 65 ++++++++++++++ .../test/model/FileSchemaTestClass.spec.js | 71 +++++++++++++++ .../test/model/StringBooleanMap.spec.js | 59 ++++++++++++ .../.openapi-generator/VERSION | 2 +- .../petstore/javascript-promise-es6/README.md | 9 +- .../docs/AnotherFakeApi.md | 12 +-- .../javascript-promise-es6/docs/FakeApi.md | 42 +++++++++ .../javascript-promise-es6/docs/File.md | 8 ++ .../docs/FileSchemaTestClass.md | 9 ++ .../javascript-promise-es6/docs/MapTest.md | 2 + .../javascript-promise-es6/docs/PetApi.md | 51 +++++++++++ .../docs/StringBooleanMap.md | 7 ++ .../javascript-promise-es6/package.json | 2 +- .../src/api/AnotherFakeApi.js | 12 +-- .../javascript-promise-es6/src/api/FakeApi.js | 49 ++++++++++ .../javascript-promise-es6/src/api/PetApi.js | 63 +++++++++++++ .../javascript-promise-es6/src/index.js | 21 +++++ .../javascript-promise-es6/src/model/File.js | 73 +++++++++++++++ .../src/model/FileSchemaTestClass.js | 79 ++++++++++++++++ .../src/model/MapTest.js | 17 ++++ .../src/model/OuterComposite.js | 6 +- .../src/model/StringBooleanMap.js | 67 ++++++++++++++ .../test/model/File.spec.js | 65 ++++++++++++++ .../test/model/FileSchemaTestClass.spec.js | 71 +++++++++++++++ .../test/model/StringBooleanMap.spec.js | 59 ++++++++++++ .../.openapi-generator/VERSION | 2 +- .../petstore/javascript-promise/README.md | 9 +- .../javascript-promise/docs/AnotherFakeApi.md | 12 +-- .../javascript-promise/docs/FakeApi.md | 42 +++++++++ .../petstore/javascript-promise/docs/File.md | 8 ++ .../docs/FileSchemaTestClass.md | 9 ++ .../javascript-promise/docs/MapTest.md | 2 + .../javascript-promise/docs/PetApi.md | 50 +++++++++++ .../docs/StringBooleanMap.md | 7 ++ .../petstore/javascript-promise/package.json | 2 +- .../javascript-promise/src/ApiClient.js | 2 +- .../src/api/AnotherFakeApi.js | 14 +-- .../javascript-promise/src/api/FakeApi.js | 60 +++++++++++-- .../src/api/FakeClassnameTags123Api.js | 2 +- .../javascript-promise/src/api/PetApi.js | 67 +++++++++++++- .../javascript-promise/src/api/StoreApi.js | 2 +- .../javascript-promise/src/api/UserApi.js | 2 +- .../petstore/javascript-promise/src/index.js | 23 ++++- .../src/model/AdditionalPropertiesClass.js | 2 +- .../javascript-promise/src/model/Animal.js | 2 +- .../src/model/AnimalFarm.js | 2 +- .../src/model/ApiResponse.js | 2 +- .../src/model/ArrayOfArrayOfNumberOnly.js | 2 +- .../src/model/ArrayOfNumberOnly.js | 2 +- .../javascript-promise/src/model/ArrayTest.js | 2 +- .../src/model/Capitalization.js | 2 +- .../javascript-promise/src/model/Cat.js | 2 +- .../javascript-promise/src/model/Category.js | 2 +- .../src/model/ClassModel.js | 2 +- .../javascript-promise/src/model/Client.js | 2 +- .../javascript-promise/src/model/Dog.js | 2 +- .../src/model/EnumArrays.js | 2 +- .../javascript-promise/src/model/EnumClass.js | 2 +- .../javascript-promise/src/model/EnumTest.js | 2 +- .../javascript-promise/src/model/File.js | 83 +++++++++++++++++ .../src/model/FileSchemaTestClass.js | 89 +++++++++++++++++++ .../src/model/FormatTest.js | 2 +- .../src/model/HasOnlyReadOnly.js | 2 +- .../javascript-promise/src/model/List.js | 2 +- .../javascript-promise/src/model/MapTest.js | 26 ++++-- ...dPropertiesAndAdditionalPropertiesClass.js | 2 +- .../src/model/Model200Response.js | 2 +- .../src/model/ModelReturn.js | 2 +- .../javascript-promise/src/model/Name.js | 2 +- .../src/model/NumberOnly.js | 2 +- .../javascript-promise/src/model/Order.js | 2 +- .../src/model/OuterComposite.js | 8 +- .../javascript-promise/src/model/OuterEnum.js | 2 +- .../javascript-promise/src/model/Pet.js | 2 +- .../src/model/ReadOnlyFirst.js | 2 +- .../src/model/SpecialModelName.js | 2 +- .../src/model/StringBooleanMap.js | 76 ++++++++++++++++ .../javascript-promise/src/model/Tag.js | 2 +- .../javascript-promise/src/model/User.js | 2 +- .../test/model/File.spec.js | 67 ++++++++++++++ .../test/model/FileSchemaTestClass.spec.js | 73 +++++++++++++++ .../test/model/StringBooleanMap.spec.js | 61 +++++++++++++ .../javascript/.openapi-generator/VERSION | 2 +- samples/client/petstore/javascript/README.md | 9 +- .../javascript/docs/AnotherFakeApi.md | 12 +-- .../petstore/javascript/docs/FakeApi.md | 44 +++++++++ .../client/petstore/javascript/docs/File.md | 8 ++ .../javascript/docs/FileSchemaTestClass.md | 9 ++ .../petstore/javascript/docs/MapTest.md | 2 + .../client/petstore/javascript/docs/PetApi.md | 52 +++++++++++ .../javascript/docs/StringBooleanMap.md | 7 ++ .../client/petstore/javascript/package.json | 2 +- .../petstore/javascript/src/ApiClient.js | 2 +- .../javascript/src/api/AnotherFakeApi.js | 14 +-- .../petstore/javascript/src/api/FakeApi.js | 55 ++++++++++-- .../src/api/FakeClassnameTags123Api.js | 2 +- .../petstore/javascript/src/api/PetApi.js | 60 ++++++++++++- .../petstore/javascript/src/api/StoreApi.js | 2 +- .../petstore/javascript/src/api/UserApi.js | 2 +- .../client/petstore/javascript/src/index.js | 23 ++++- .../src/model/AdditionalPropertiesClass.js | 2 +- .../petstore/javascript/src/model/Animal.js | 2 +- .../javascript/src/model/AnimalFarm.js | 2 +- .../javascript/src/model/ApiResponse.js | 2 +- .../src/model/ArrayOfArrayOfNumberOnly.js | 2 +- .../javascript/src/model/ArrayOfNumberOnly.js | 2 +- .../javascript/src/model/ArrayTest.js | 2 +- .../javascript/src/model/Capitalization.js | 2 +- .../petstore/javascript/src/model/Cat.js | 2 +- .../petstore/javascript/src/model/Category.js | 2 +- .../javascript/src/model/ClassModel.js | 2 +- .../petstore/javascript/src/model/Client.js | 2 +- .../petstore/javascript/src/model/Dog.js | 2 +- .../javascript/src/model/EnumArrays.js | 2 +- .../javascript/src/model/EnumClass.js | 2 +- .../petstore/javascript/src/model/EnumTest.js | 2 +- .../petstore/javascript/src/model/File.js | 83 +++++++++++++++++ .../src/model/FileSchemaTestClass.js | 89 +++++++++++++++++++ .../javascript/src/model/FormatTest.js | 2 +- .../javascript/src/model/HasOnlyReadOnly.js | 2 +- .../petstore/javascript/src/model/List.js | 2 +- .../petstore/javascript/src/model/MapTest.js | 26 ++++-- ...dPropertiesAndAdditionalPropertiesClass.js | 2 +- .../javascript/src/model/Model200Response.js | 2 +- .../javascript/src/model/ModelReturn.js | 2 +- .../petstore/javascript/src/model/Name.js | 2 +- .../javascript/src/model/NumberOnly.js | 2 +- .../petstore/javascript/src/model/Order.js | 2 +- .../javascript/src/model/OuterComposite.js | 8 +- .../javascript/src/model/OuterEnum.js | 2 +- .../petstore/javascript/src/model/Pet.js | 2 +- .../javascript/src/model/ReadOnlyFirst.js | 2 +- .../javascript/src/model/SpecialModelName.js | 2 +- .../javascript/src/model/StringBooleanMap.js | 76 ++++++++++++++++ .../petstore/javascript/src/model/Tag.js | 2 +- .../petstore/javascript/src/model/User.js | 2 +- .../javascript/test/model/File.spec.js | 67 ++++++++++++++ .../test/model/FileSchemaTestClass.spec.js | 73 +++++++++++++++ .../test/model/StringBooleanMap.spec.js | 61 +++++++++++++ 171 files changed, 3065 insertions(+), 255 deletions(-) create mode 100644 samples/client/petstore/javascript-es6/docs/File.md create mode 100644 samples/client/petstore/javascript-es6/docs/FileSchemaTestClass.md create mode 100644 samples/client/petstore/javascript-es6/docs/StringBooleanMap.md create mode 100644 samples/client/petstore/javascript-es6/src/model/File.js create mode 100644 samples/client/petstore/javascript-es6/src/model/FileSchemaTestClass.js create mode 100644 samples/client/petstore/javascript-es6/src/model/StringBooleanMap.js create mode 100644 samples/client/petstore/javascript-es6/test/model/File.spec.js create mode 100644 samples/client/petstore/javascript-es6/test/model/FileSchemaTestClass.spec.js create mode 100644 samples/client/petstore/javascript-es6/test/model/StringBooleanMap.spec.js create mode 100644 samples/client/petstore/javascript-promise-es6/docs/File.md create mode 100644 samples/client/petstore/javascript-promise-es6/docs/FileSchemaTestClass.md create mode 100644 samples/client/petstore/javascript-promise-es6/docs/StringBooleanMap.md create mode 100644 samples/client/petstore/javascript-promise-es6/src/model/File.js create mode 100644 samples/client/petstore/javascript-promise-es6/src/model/FileSchemaTestClass.js create mode 100644 samples/client/petstore/javascript-promise-es6/src/model/StringBooleanMap.js create mode 100644 samples/client/petstore/javascript-promise-es6/test/model/File.spec.js create mode 100644 samples/client/petstore/javascript-promise-es6/test/model/FileSchemaTestClass.spec.js create mode 100644 samples/client/petstore/javascript-promise-es6/test/model/StringBooleanMap.spec.js create mode 100644 samples/client/petstore/javascript-promise/docs/File.md create mode 100644 samples/client/petstore/javascript-promise/docs/FileSchemaTestClass.md create mode 100644 samples/client/petstore/javascript-promise/docs/StringBooleanMap.md create mode 100644 samples/client/petstore/javascript-promise/src/model/File.js create mode 100644 samples/client/petstore/javascript-promise/src/model/FileSchemaTestClass.js create mode 100644 samples/client/petstore/javascript-promise/src/model/StringBooleanMap.js create mode 100644 samples/client/petstore/javascript-promise/test/model/File.spec.js create mode 100644 samples/client/petstore/javascript-promise/test/model/FileSchemaTestClass.spec.js create mode 100644 samples/client/petstore/javascript-promise/test/model/StringBooleanMap.spec.js create mode 100644 samples/client/petstore/javascript/docs/File.md create mode 100644 samples/client/petstore/javascript/docs/FileSchemaTestClass.md create mode 100644 samples/client/petstore/javascript/docs/StringBooleanMap.md create mode 100644 samples/client/petstore/javascript/src/model/File.js create mode 100644 samples/client/petstore/javascript/src/model/FileSchemaTestClass.js create mode 100644 samples/client/petstore/javascript/src/model/StringBooleanMap.js create mode 100644 samples/client/petstore/javascript/test/model/File.spec.js create mode 100644 samples/client/petstore/javascript/test/model/FileSchemaTestClass.spec.js create mode 100644 samples/client/petstore/javascript/test/model/StringBooleanMap.spec.js diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptClientCodegen.java index ca6433b5ca92..0bbefee3bed3 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptClientCodegen.java @@ -837,6 +837,13 @@ public class JavascriptClientCodegen extends DefaultCodegen implements CodegenCo return newOperationId; } + // operationId starts with a number + if (operationId.matches("^\\d.*")) { + String newOperationId = camelize("call_" + operationId, true); + LOGGER.warn(operationId + " (starting with a number) cannot be used as method name. Renamed to " + newOperationId); + return newOperationId; + } + return operationId; } diff --git a/modules/openapi-generator/src/main/resources/Javascript/es6/package.mustache b/modules/openapi-generator/src/main/resources/Javascript/es6/package.mustache index 997c5e240558..56376a1eede0 100644 --- a/modules/openapi-generator/src/main/resources/Javascript/es6/package.mustache +++ b/modules/openapi-generator/src/main/resources/Javascript/es6/package.mustache @@ -13,7 +13,7 @@ "dependencies": { "babel": "^6.23.0", "babel-cli": "^6.26.0", - "superagent": "3.5.2" + "superagent": "3.7.0" }, "devDependencies": { "babel-core": "6.26.0", diff --git a/modules/openapi-generator/src/main/resources/Javascript/package.mustache b/modules/openapi-generator/src/main/resources/Javascript/package.mustache index 79d0d8f67214..b40c7cc8fb82 100644 --- a/modules/openapi-generator/src/main/resources/Javascript/package.mustache +++ b/modules/openapi-generator/src/main/resources/Javascript/package.mustache @@ -11,7 +11,7 @@ "fs": false }, "dependencies": { - "superagent": "3.5.2" + "superagent": "3.7.0" }, "devDependencies": { "mocha": "~2.3.4", diff --git a/samples/client/petstore-security-test/javascript/.openapi-generator/VERSION b/samples/client/petstore-security-test/javascript/.openapi-generator/VERSION index f9f7450d1359..4395ff592326 100644 --- a/samples/client/petstore-security-test/javascript/.openapi-generator/VERSION +++ b/samples/client/petstore-security-test/javascript/.openapi-generator/VERSION @@ -1 +1 @@ -2.3.0-SNAPSHOT \ No newline at end of file +3.2.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore-security-test/javascript/README.md b/samples/client/petstore-security-test/javascript/README.md index 4a9bd7e80db9..648467de2371 100644 --- a/samples/client/petstore-security-test/javascript/README.md +++ b/samples/client/petstore-security-test/javascript/README.md @@ -1,12 +1,12 @@ -# swagger_petstore____end____rn_n_r +# open_api_petstore____end____rn_n_r -SwaggerPetstoreEndRnNR - JavaScript client for swagger_petstore____end____rn_n_r +OpenApiPetstoreEndRnNR - JavaScript client for open_api_petstore____end____rn_n_r This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ *_/ ' \" =end -- -This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project: +This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - API version: 1.0.0 *_/ ' \" =end -- \\r\\n \\n \\r - Package version: 1.0.0 *_/ =end -- \r\n \n \r -- Build package: io.swagger.codegen.languages.JavascriptClientCodegen +- Build package: org.openapitools.codegen.languages.JavascriptClientCodegen ## Installation @@ -20,7 +20,7 @@ please follow the procedure in ["Publishing npm packages"](https://docs.npmjs.co Then install it via: ```shell -npm install swagger_petstore____end____rn_n_r --save +npm install open_api_petstore____end____rn_n_r --save ``` ##### Local development @@ -38,13 +38,13 @@ Next, [link](https://docs.npmjs.com/cli/link) it globally in npm with the follow npm link ``` -Finally, switch to the directory you want to use your swagger_petstore____end____rn_n_r from, and run: +Finally, switch to the directory you want to use your open_api_petstore____end____rn_n_r from, and run: ```shell npm link /path/to/ ``` -You should now be able to `require('swagger_petstore____end____rn_n_r')` in javascript files from the directory you ran the last +You should now be able to `require('open_api_petstore____end____rn_n_r')` in javascript files from the directory you ran the last command above from. #### git @@ -93,12 +93,11 @@ module: { Please follow the [installation](#installation) instruction and execute the following JS code: ```javascript -var SwaggerPetstoreEndRnNR = require('swagger_petstore____end____rn_n_r'); +var OpenApiPetstoreEndRnNR = require('open_api_petstore____end____rn_n_r'); -var api = new SwaggerPetstoreEndRnNR.FakeApi() - -var opts = { - 'testCodeInjectEndRnNR': "testCodeInjectEndRnNR_example" // {String} To test code injection *_/ ' \" =end -- \\r\\n \\n \\r +var api = new OpenApiPetstoreEndRnNR.FakeApi() +var opts = { + 'UNKNOWN_BASE_TYPE': new OpenApiPetstoreEndRnNR.UNKNOWN_BASE_TYPE() // {UNKNOWN_BASE_TYPE} }; var callback = function(error, data, response) { @@ -114,16 +113,16 @@ api.testCodeInjectEndRnNR(opts, callback); ## Documentation for API Endpoints -All URIs are relative to *https://petstore.swagger.io *_/ ' \" =end -- \\r\\n \\n \\r/v2 *_/ ' \" =end -- \\r\\n \\n \\r* +All URIs are relative to *http://petstore.swagger.io *_/ ' \" =end -- \\r\\n \\n \\r/v2 *_/ ' \" =end -- \\r\\n \\n \\r* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*SwaggerPetstoreEndRnNR.FakeApi* | [**testCodeInjectEndRnNR**](docs/FakeApi.md#testCodeInjectEndRnNR) | **PUT** /fake | To test code injection *_/ ' \" =end -- \\r\\n \\n \\r +*OpenApiPetstoreEndRnNR.FakeApi* | [**testCodeInjectEndRnNR**](docs/FakeApi.md#testCodeInjectEndRnNR) | **PUT** /fake | To test code injection *_/ ' \" =end -- \\r\\n \\n \\r ## Documentation for Models - - [SwaggerPetstoreEndRnNR.ModelReturn](docs/ModelReturn.md) + - [OpenApiPetstoreEndRnNR.ModelReturn](docs/ModelReturn.md) ## Documentation for Authorization diff --git a/samples/client/petstore-security-test/javascript/docs/FakeApi.md b/samples/client/petstore-security-test/javascript/docs/FakeApi.md index 61b58cf72a97..de667cca9624 100644 --- a/samples/client/petstore-security-test/javascript/docs/FakeApi.md +++ b/samples/client/petstore-security-test/javascript/docs/FakeApi.md @@ -1,6 +1,6 @@ -# SwaggerPetstoreEndRnNR.FakeApi +# OpenApiPetstoreEndRnNR.FakeApi -All URIs are relative to *https://petstore.swagger.io *_/ ' \" =end -- \\r\\n \\n \\r/v2 *_/ ' \" =end -- \\r\\n \\n \\r* +All URIs are relative to *http://petstore.swagger.io *_/ ' \" =end -- \\r\\n \\n \\r/v2 *_/ ' \" =end -- \\r\\n \\n \\r* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -13,16 +13,16 @@ Method | HTTP request | Description To test code injection *_/ ' \" =end -- \\r\\n \\n \\r +To test code injection *_/ ' \" =end -- \\r\\n \\n \\r + ### Example ```javascript -var SwaggerPetstoreEndRnNR = require('swagger_petstore____end____rn_n_r'); +var OpenApiPetstoreEndRnNR = require('open_api_petstore____end____rn_n_r'); -var apiInstance = new SwaggerPetstoreEndRnNR.FakeApi(); - -var opts = { - 'testCodeInjectEndRnNR': "testCodeInjectEndRnNR_example" // String | To test code injection *_/ ' \" =end -- \\r\\n \\n \\r +var apiInstance = new OpenApiPetstoreEndRnNR.FakeApi(); +var opts = { + 'UNKNOWN_BASE_TYPE': new OpenApiPetstoreEndRnNR.UNKNOWN_BASE_TYPE() // UNKNOWN_BASE_TYPE | }; - var callback = function(error, data, response) { if (error) { console.error(error); @@ -37,7 +37,7 @@ apiInstance.testCodeInjectEndRnNR(opts, callback); Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **testCodeInjectEndRnNR** | **String**| To test code injection *_/ ' \" =end -- \\r\\n \\n \\r | [optional] + **UNKNOWN_BASE_TYPE** | [**UNKNOWN_BASE_TYPE**](UNKNOWN_BASE_TYPE.md)| | [optional] ### Return type @@ -50,5 +50,5 @@ No authorization required ### HTTP request headers - **Content-Type**: application/json, *_/ =end -- - - **Accept**: application/json, *_/ =end -- + - **Accept**: Not defined diff --git a/samples/client/petstore-security-test/javascript/docs/ModelReturn.md b/samples/client/petstore-security-test/javascript/docs/ModelReturn.md index e542020a95c8..1ccf256e4e7d 100644 --- a/samples/client/petstore-security-test/javascript/docs/ModelReturn.md +++ b/samples/client/petstore-security-test/javascript/docs/ModelReturn.md @@ -1,4 +1,4 @@ -# SwaggerPetstoreEndRnNR.ModelReturn +# OpenApiPetstoreEndRnNR.ModelReturn ## Properties Name | Type | Description | Notes diff --git a/samples/client/petstore-security-test/javascript/git_push.sh b/samples/client/petstore-security-test/javascript/git_push.sh index 0d041ad0ba49..04dd5df38e83 100644 --- a/samples/client/petstore-security-test/javascript/git_push.sh +++ b/samples/client/petstore-security-test/javascript/git_push.sh @@ -1,7 +1,7 @@ #!/bin/sh # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ # -# Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update" +# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" git_user_id=$1 git_repo_id=$2 diff --git a/samples/client/petstore-security-test/javascript/package.json b/samples/client/petstore-security-test/javascript/package.json index 9fae64eb6469..d045d120e0ec 100644 --- a/samples/client/petstore-security-test/javascript/package.json +++ b/samples/client/petstore-security-test/javascript/package.json @@ -1,5 +1,5 @@ { - "name": "swagger_petstore____end____rn_n_r", + "name": "open_api_petstore____end____rn_n_r", "version": "1.0.0 *_/ =end -- \r\n \n \r", "description": "This_spec_is_mainly_for_testing_Petstore_server_and_contains_fake_endpoints_models__Please_do_not_use_this_for_any_other_purpose__Special_characters_______end______", "license": "Apache-2.0 */ ' " =end -- \r\n \n \r", @@ -11,7 +11,7 @@ "fs": false }, "dependencies": { - "superagent": "3.5.2" + "superagent": "3.7.0" }, "devDependencies": { "mocha": "~2.3.4", diff --git a/samples/client/petstore-security-test/javascript/src/ApiClient.js b/samples/client/petstore-security-test/javascript/src/ApiClient.js index 193dcfa683b1..cbcd2ce4c391 100644 --- a/samples/client/petstore-security-test/javascript/src/ApiClient.js +++ b/samples/client/petstore-security-test/javascript/src/ApiClient.js @@ -1,14 +1,14 @@ /** - * Swagger Petstore *_/ ' \" =end -- \\r\\n \\n \\r + * OpenAPI Petstore *_/ ' \" =end -- \\r\\n \\n \\r * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ *_/ ' \" =end -- * * OpenAPI spec version: 1.0.0 *_/ ' \" =end -- \\r\\n \\n \\r - * Contact: apiteam@swagger.io *_/ ' \" =end -- \\r\\n \\n \\r + * Contact: something@something.abc *_/ ' \" =end -- \\r\\n \\n \\r * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech * - * Swagger Codegen version: 2.3.0-SNAPSHOT + * OpenAPI Generator version: 3.2.0-SNAPSHOT * * Do not edit the class manually. * @@ -23,10 +23,10 @@ module.exports = factory(require('superagent'), require('querystring')); } else { // Browser globals (root is window) - if (!root.SwaggerPetstoreEndRnNR) { - root.SwaggerPetstoreEndRnNR = {}; + if (!root.OpenApiPetstoreEndRnNR) { + root.OpenApiPetstoreEndRnNR = {}; } - root.SwaggerPetstoreEndRnNR.ApiClient = factory(root.superagent, root.querystring); + root.OpenApiPetstoreEndRnNR.ApiClient = factory(root.superagent, root.querystring); } }(this, function(superagent, querystring) { 'use strict'; @@ -47,9 +47,9 @@ /** * The base URL against which to resolve every API call's (relative) path. * @type {String} - * @default https://petstore.swagger.io *_/ ' \" =end -- \\r\\n \\n \\r/v2 *_/ ' \" =end -- \\r\\n \\n \\r + * @default http://petstore.swagger.io *_/ ' \" =end -- \\r\\n \\n \\r/v2 *_/ ' \" =end -- \\r\\n \\n \\r */ - this.basePath = 'https://petstore.swagger.io *_/ ' \" =end -- \\r\\n \\n \\r/v2 *_/ ' \" =end -- \\r\\n \\n \\r'.replace(/\/+$/, ''); + this.basePath = 'http://petstore.swagger.io *_/ ' \" =end -- \\r\\n \\n \\r/v2 *_/ ' \" =end -- \\r\\n \\n \\r'.replace(/\/+$/, ''); /** * The authentication methods to be included for all API calls. @@ -96,6 +96,10 @@ this.agent = new superagent.agent(); } + /* + * Allow user to override superagent agent + */ + this.requestAgent = null; }; /** @@ -413,6 +417,12 @@ // set header parameters request.set(this.defaultHeaders).set(this.normalizeParams(headerParams)); + + // set requestAgent if it is set by user + if (this.requestAgent) { + request.agent(this.requestAgent); + } + // set request timeout request.timeout(this.timeout); diff --git a/samples/client/petstore-security-test/javascript/src/api/FakeApi.js b/samples/client/petstore-security-test/javascript/src/api/FakeApi.js index 32e2c7ea1ec7..e7fdb205e7ef 100644 --- a/samples/client/petstore-security-test/javascript/src/api/FakeApi.js +++ b/samples/client/petstore-security-test/javascript/src/api/FakeApi.js @@ -1,14 +1,14 @@ /** - * Swagger Petstore *_/ ' \" =end -- \\r\\n \\n \\r + * OpenAPI Petstore *_/ ' \" =end -- \\r\\n \\n \\r * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ *_/ ' \" =end -- * * OpenAPI spec version: 1.0.0 *_/ ' \" =end -- \\r\\n \\n \\r - * Contact: apiteam@swagger.io *_/ ' \" =end -- \\r\\n \\n \\r + * Contact: something@something.abc *_/ ' \" =end -- \\r\\n \\n \\r * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech * - * Swagger Codegen version: 2.3.0-SNAPSHOT + * OpenAPI Generator version: 3.2.0-SNAPSHOT * * Do not edit the class manually. * @@ -17,18 +17,18 @@ (function(root, factory) { if (typeof define === 'function' && define.amd) { // AMD. Register as an anonymous module. - define(['ApiClient'], factory); + define(['ApiClient', 'model/UNKNOWN_BASE_TYPE'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. - module.exports = factory(require('../ApiClient')); + module.exports = factory(require('../ApiClient'), require('../model/UNKNOWN_BASE_TYPE')); } else { // Browser globals (root is window) - if (!root.SwaggerPetstoreEndRnNR) { - root.SwaggerPetstoreEndRnNR = {}; + if (!root.OpenApiPetstoreEndRnNR) { + root.OpenApiPetstoreEndRnNR = {}; } - root.SwaggerPetstoreEndRnNR.FakeApi = factory(root.SwaggerPetstoreEndRnNR.ApiClient); + root.OpenApiPetstoreEndRnNR.FakeApi = factory(root.OpenApiPetstoreEndRnNR.ApiClient, root.OpenApiPetstoreEndRnNR.UNKNOWN_BASE_TYPE); } -}(this, function(ApiClient) { +}(this, function(ApiClient, UNKNOWN_BASE_TYPE) { 'use strict'; /** @@ -57,14 +57,15 @@ */ /** + * To test code injection *_/ ' \" =end -- \\r\\n \\n \\r * To test code injection *_/ ' \" =end -- \\r\\n \\n \\r * @param {Object} opts Optional parameters - * @param {String} opts.testCodeInjectEndRnNR To test code injection *_/ ' \" =end -- \\r\\n \\n \\r + * @param {module:model/UNKNOWN_BASE_TYPE} opts.UNKNOWN_BASE_TYPE * @param {module:api/FakeApi~testCodeInjectEndRnNRCallback} callback The callback function, accepting three arguments: error, data, response */ this.testCodeInjectEndRnNR = function(opts, callback) { opts = opts || {}; - var postBody = null; + var postBody = opts['UNKNOWN_BASE_TYPE']; var pathParams = { @@ -76,12 +77,11 @@ var headerParams = { }; var formParams = { - 'test code inject */ ' " =end -- \r\n \n \r': opts['testCodeInjectEndRnNR'] }; var authNames = []; var contentTypes = ['application/json', '*_/ =end -- ']; - var accepts = ['application/json', '*_/ =end -- ']; + var accepts = []; var returnType = null; return this.apiClient.callApi( diff --git a/samples/client/petstore-security-test/javascript/src/index.js b/samples/client/petstore-security-test/javascript/src/index.js index 4da0fef98eac..8006be061a2a 100644 --- a/samples/client/petstore-security-test/javascript/src/index.js +++ b/samples/client/petstore-security-test/javascript/src/index.js @@ -1,14 +1,14 @@ /** - * Swagger Petstore *_/ ' \" =end -- \\r\\n \\n \\r + * OpenAPI Petstore *_/ ' \" =end -- \\r\\n \\n \\r * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ *_/ ' \" =end -- * * OpenAPI spec version: 1.0.0 *_/ ' \" =end -- \\r\\n \\n \\r - * Contact: apiteam@swagger.io *_/ ' \" =end -- \\r\\n \\n \\r + * Contact: something@something.abc *_/ ' \" =end -- \\r\\n \\n \\r * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech * - * Swagger Codegen version: 2.3.0-SNAPSHOT + * OpenAPI Generator version: 3.2.0-SNAPSHOT * * Do not edit the class manually. * @@ -31,9 +31,9 @@ *

* An AMD (recommended!) or CommonJS application will generally do something equivalent to the following: *

-   * var SwaggerPetstoreEndRnNR = require('index'); // See note below*.
-   * var xxxSvc = new SwaggerPetstoreEndRnNR.XxxApi(); // Allocate the API class we're going to use.
-   * var yyyModel = new SwaggerPetstoreEndRnNR.Yyy(); // Construct a model instance.
+   * var OpenApiPetstoreEndRnNR = require('index'); // See note below*.
+   * var xxxSvc = new OpenApiPetstoreEndRnNR.XxxApi(); // Allocate the API class we're going to use.
+   * var yyyModel = new OpenApiPetstoreEndRnNR.Yyy(); // Construct a model instance.
    * yyyModel.someProperty = 'someValue';
    * ...
    * var zzz = xxxSvc.doSomething(yyyModel); // Invoke the service.
@@ -45,8 +45,8 @@
    * 

* A non-AMD browser application (discouraged) might do something like this: *

-   * var xxxSvc = new SwaggerPetstoreEndRnNR.XxxApi(); // Allocate the API class we're going to use.
-   * var yyy = new SwaggerPetstoreEndRnNR.Yyy(); // Construct a model instance.
+   * var xxxSvc = new OpenApiPetstoreEndRnNR.XxxApi(); // Allocate the API class we're going to use.
+   * var yyy = new OpenApiPetstoreEndRnNR.Yyy(); // Construct a model instance.
    * yyyModel.someProperty = 'someValue';
    * ...
    * var zzz = xxxSvc.doSomething(yyyModel); // Invoke the service.
diff --git a/samples/client/petstore-security-test/javascript/src/model/ModelReturn.js b/samples/client/petstore-security-test/javascript/src/model/ModelReturn.js
index 6e9c1fd3c72a..a8865e7e0df9 100644
--- a/samples/client/petstore-security-test/javascript/src/model/ModelReturn.js
+++ b/samples/client/petstore-security-test/javascript/src/model/ModelReturn.js
@@ -1,14 +1,14 @@
 /**
- * Swagger Petstore *_/ ' \" =end -- \\r\\n \\n \\r
+ * OpenAPI Petstore *_/ ' \" =end -- \\r\\n \\n \\r
  * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\  *_/ ' \" =end --       
  *
  * OpenAPI spec version: 1.0.0 *_/ ' \" =end -- \\r\\n \\n \\r
- * Contact: apiteam@swagger.io *_/ ' \" =end -- \\r\\n \\n \\r
+ * Contact: something@something.abc *_/ ' \" =end -- \\r\\n \\n \\r
  *
- * NOTE: This class is auto generated by the swagger code generator program.
- * https://github.com/swagger-api/swagger-codegen.git
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
  *
- * Swagger Codegen version: 2.3.0-SNAPSHOT
+ * OpenAPI Generator version: 3.2.0-SNAPSHOT
  *
  * Do not edit the class manually.
  *
@@ -23,10 +23,10 @@
     module.exports = factory(require('../ApiClient'));
   } else {
     // Browser globals (root is window)
-    if (!root.SwaggerPetstoreEndRnNR) {
-      root.SwaggerPetstoreEndRnNR = {};
+    if (!root.OpenApiPetstoreEndRnNR) {
+      root.OpenApiPetstoreEndRnNR = {};
     }
-    root.SwaggerPetstoreEndRnNR.ModelReturn = factory(root.SwaggerPetstoreEndRnNR.ApiClient);
+    root.OpenApiPetstoreEndRnNR.ModelReturn = factory(root.OpenApiPetstoreEndRnNR.ApiClient);
   }
 }(this, function(ApiClient) {
   'use strict';
diff --git a/samples/client/petstore/javascript-es6/.openapi-generator/VERSION b/samples/client/petstore/javascript-es6/.openapi-generator/VERSION
index 1c00c5181548..14900cee60e8 100644
--- a/samples/client/petstore/javascript-es6/.openapi-generator/VERSION
+++ b/samples/client/petstore/javascript-es6/.openapi-generator/VERSION
@@ -1 +1 @@
-3.0.2-SNAPSHOT
\ No newline at end of file
+3.2.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/javascript-es6/README.md b/samples/client/petstore/javascript-es6/README.md
index 9503c4fd15ae..7674da7bb398 100644
--- a/samples/client/petstore/javascript-es6/README.md
+++ b/samples/client/petstore/javascript-es6/README.md
@@ -80,7 +80,7 @@ var callback = function(error, data, response) {
     console.log('API called successfully. Returned data: ' + data);
   }
 };
-api.testSpecialTags(client, callback);
+api.call123testSpecialTags(client, callback);
 
 ```
 
@@ -90,11 +90,12 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
 
 Class | Method | HTTP request | Description
 ------------ | ------------- | ------------- | -------------
-*OpenApiPetstore.AnotherFakeApi* | [**testSpecialTags**](docs/AnotherFakeApi.md#testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags
+*OpenApiPetstore.AnotherFakeApi* | [**call123testSpecialTags**](docs/AnotherFakeApi.md#call123testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags
 *OpenApiPetstore.FakeApi* | [**fakeOuterBooleanSerialize**](docs/FakeApi.md#fakeOuterBooleanSerialize) | **POST** /fake/outer/boolean | 
 *OpenApiPetstore.FakeApi* | [**fakeOuterCompositeSerialize**](docs/FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite | 
 *OpenApiPetstore.FakeApi* | [**fakeOuterNumberSerialize**](docs/FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number | 
 *OpenApiPetstore.FakeApi* | [**fakeOuterStringSerialize**](docs/FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string | 
+*OpenApiPetstore.FakeApi* | [**testBodyWithFileSchema**](docs/FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | 
 *OpenApiPetstore.FakeApi* | [**testBodyWithQueryParams**](docs/FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | 
 *OpenApiPetstore.FakeApi* | [**testClientModel**](docs/FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model
 *OpenApiPetstore.FakeApi* | [**testEndpointParameters**](docs/FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 
@@ -110,6 +111,7 @@ Class | Method | HTTP request | Description
 *OpenApiPetstore.PetApi* | [**updatePet**](docs/PetApi.md#updatePet) | **PUT** /pet | Update an existing pet
 *OpenApiPetstore.PetApi* | [**updatePetWithForm**](docs/PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data
 *OpenApiPetstore.PetApi* | [**uploadFile**](docs/PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image
+*OpenApiPetstore.PetApi* | [**uploadFileWithRequiredFile**](docs/PetApi.md#uploadFileWithRequiredFile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required)
 *OpenApiPetstore.StoreApi* | [**deleteOrder**](docs/StoreApi.md#deleteOrder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID
 *OpenApiPetstore.StoreApi* | [**getInventory**](docs/StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status
 *OpenApiPetstore.StoreApi* | [**getOrderById**](docs/StoreApi.md#getOrderById) | **GET** /store/order/{order_id} | Find purchase order by ID
@@ -142,6 +144,8 @@ Class | Method | HTTP request | Description
  - [OpenApiPetstore.EnumArrays](docs/EnumArrays.md)
  - [OpenApiPetstore.EnumClass](docs/EnumClass.md)
  - [OpenApiPetstore.EnumTest](docs/EnumTest.md)
+ - [OpenApiPetstore.File](docs/File.md)
+ - [OpenApiPetstore.FileSchemaTestClass](docs/FileSchemaTestClass.md)
  - [OpenApiPetstore.FormatTest](docs/FormatTest.md)
  - [OpenApiPetstore.HasOnlyReadOnly](docs/HasOnlyReadOnly.md)
  - [OpenApiPetstore.List](docs/List.md)
@@ -157,6 +161,7 @@ Class | Method | HTTP request | Description
  - [OpenApiPetstore.Pet](docs/Pet.md)
  - [OpenApiPetstore.ReadOnlyFirst](docs/ReadOnlyFirst.md)
  - [OpenApiPetstore.SpecialModelName](docs/SpecialModelName.md)
+ - [OpenApiPetstore.StringBooleanMap](docs/StringBooleanMap.md)
  - [OpenApiPetstore.Tag](docs/Tag.md)
  - [OpenApiPetstore.User](docs/User.md)
 
diff --git a/samples/client/petstore/javascript-es6/docs/AnotherFakeApi.md b/samples/client/petstore/javascript-es6/docs/AnotherFakeApi.md
index c70f1769bf62..efd102e1ab31 100644
--- a/samples/client/petstore/javascript-es6/docs/AnotherFakeApi.md
+++ b/samples/client/petstore/javascript-es6/docs/AnotherFakeApi.md
@@ -4,16 +4,16 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
 
 Method | HTTP request | Description
 ------------- | ------------- | -------------
-[**testSpecialTags**](AnotherFakeApi.md#testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags
+[**call123testSpecialTags**](AnotherFakeApi.md#call123testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags
 
 
-
-# **testSpecialTags**
-> Client testSpecialTags(client)
+
+# **call123testSpecialTags**
+> Client call123testSpecialTags(client)
 
 To test special tags
 
-To test special tags
+To test special tags and operation ID starting with number
 
 ### Example
 ```javascript
@@ -21,7 +21,7 @@ import OpenApiPetstore from 'open_api_petstore';
 
 let apiInstance = new OpenApiPetstore.AnotherFakeApi();
 let client = new OpenApiPetstore.Client(); // Client | client model
-apiInstance.testSpecialTags(client, (error, data, response) => {
+apiInstance.call123testSpecialTags(client, (error, data, response) => {
   if (error) {
     console.error(error);
   } else {
diff --git a/samples/client/petstore/javascript-es6/docs/FakeApi.md b/samples/client/petstore/javascript-es6/docs/FakeApi.md
index 3327bfce4e6f..b51de14ceaa5 100644
--- a/samples/client/petstore/javascript-es6/docs/FakeApi.md
+++ b/samples/client/petstore/javascript-es6/docs/FakeApi.md
@@ -8,6 +8,7 @@ Method | HTTP request | Description
 [**fakeOuterCompositeSerialize**](FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite | 
 [**fakeOuterNumberSerialize**](FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number | 
 [**fakeOuterStringSerialize**](FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string | 
+[**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | 
 [**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | 
 [**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model
 [**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 
@@ -192,6 +193,48 @@ No authorization required
  - **Content-Type**: Not defined
  - **Accept**: */*
 
+
+# **testBodyWithFileSchema**
+> testBodyWithFileSchema(fileSchemaTestClass)
+
+
+
+For this test, the body for this request much reference a schema named `File`.
+
+### Example
+```javascript
+import OpenApiPetstore from 'open_api_petstore';
+
+let apiInstance = new OpenApiPetstore.FakeApi();
+let fileSchemaTestClass = new OpenApiPetstore.FileSchemaTestClass(); // FileSchemaTestClass | 
+apiInstance.testBodyWithFileSchema(fileSchemaTestClass, (error, data, response) => {
+  if (error) {
+    console.error(error);
+  } else {
+    console.log('API called successfully.');
+  }
+});
+```
+
+### Parameters
+
+Name | Type | Description  | Notes
+------------- | ------------- | ------------- | -------------
+ **fileSchemaTestClass** | [**FileSchemaTestClass**](FileSchemaTestClass.md)|  | 
+
+### Return type
+
+null (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: Not defined
+
 
 # **testBodyWithQueryParams**
 > testBodyWithQueryParams(query, user)
diff --git a/samples/client/petstore/javascript-es6/docs/File.md b/samples/client/petstore/javascript-es6/docs/File.md
new file mode 100644
index 000000000000..a34d76a3e46e
--- /dev/null
+++ b/samples/client/petstore/javascript-es6/docs/File.md
@@ -0,0 +1,8 @@
+# OpenApiPetstore.File
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**sourceURI** | **String** | Test capitalization | [optional] 
+
+
diff --git a/samples/client/petstore/javascript-es6/docs/FileSchemaTestClass.md b/samples/client/petstore/javascript-es6/docs/FileSchemaTestClass.md
new file mode 100644
index 000000000000..3ccb4162dcc1
--- /dev/null
+++ b/samples/client/petstore/javascript-es6/docs/FileSchemaTestClass.md
@@ -0,0 +1,9 @@
+# OpenApiPetstore.FileSchemaTestClass
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**file** | **File** |  | [optional] 
+**files** | **[File]** |  | [optional] 
+
+
diff --git a/samples/client/petstore/javascript-es6/docs/MapTest.md b/samples/client/petstore/javascript-es6/docs/MapTest.md
index 4a128da00fd0..f1075bf0681f 100644
--- a/samples/client/petstore/javascript-es6/docs/MapTest.md
+++ b/samples/client/petstore/javascript-es6/docs/MapTest.md
@@ -5,6 +5,8 @@ Name | Type | Description | Notes
 ------------ | ------------- | ------------- | -------------
 **mapMapOfString** | **{String: {String: String}}** |  | [optional] 
 **mapOfEnumString** | **{String: String}** |  | [optional] 
+**directMap** | **{String: Boolean}** |  | [optional] 
+**indirectMap** | [**StringBooleanMap**](StringBooleanMap.md) |  | [optional] 
 
 
 
diff --git a/samples/client/petstore/javascript-es6/docs/PetApi.md b/samples/client/petstore/javascript-es6/docs/PetApi.md
index 324ecfbe867a..76dabe26aed6 100644
--- a/samples/client/petstore/javascript-es6/docs/PetApi.md
+++ b/samples/client/petstore/javascript-es6/docs/PetApi.md
@@ -12,6 +12,7 @@ Method | HTTP request | Description
 [**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet
 [**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data
 [**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image
+[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required)
 
 
 
@@ -398,3 +399,54 @@ Name | Type | Description  | Notes
  - **Content-Type**: multipart/form-data
  - **Accept**: application/json
 
+
+# **uploadFileWithRequiredFile**
+> ApiResponse uploadFileWithRequiredFile(petId, requiredFile, opts)
+
+uploads an image (required)
+
+### Example
+```javascript
+import OpenApiPetstore from 'open_api_petstore';
+let defaultClient = OpenApiPetstore.ApiClient.instance;
+
+// Configure OAuth2 access token for authorization: petstore_auth
+let petstore_auth = defaultClient.authentications['petstore_auth'];
+petstore_auth.accessToken = 'YOUR ACCESS TOKEN';
+
+let apiInstance = new OpenApiPetstore.PetApi();
+let petId = 789; // Number | ID of pet to update
+let requiredFile = "/path/to/file"; // File | file to upload
+let opts = {
+  'additionalMetadata': "additionalMetadata_example" // String | Additional data to pass to server
+};
+apiInstance.uploadFileWithRequiredFile(petId, requiredFile, opts, (error, data, response) => {
+  if (error) {
+    console.error(error);
+  } else {
+    console.log('API called successfully. Returned data: ' + data);
+  }
+});
+```
+
+### Parameters
+
+Name | Type | Description  | Notes
+------------- | ------------- | ------------- | -------------
+ **petId** | **Number**| ID of pet to update | 
+ **requiredFile** | **File**| file to upload | 
+ **additionalMetadata** | **String**| Additional data to pass to server | [optional] 
+
+### Return type
+
+[**ApiResponse**](ApiResponse.md)
+
+### Authorization
+
+[petstore_auth](../README.md#petstore_auth)
+
+### HTTP request headers
+
+ - **Content-Type**: multipart/form-data
+ - **Accept**: application/json
+
diff --git a/samples/client/petstore/javascript-es6/docs/StringBooleanMap.md b/samples/client/petstore/javascript-es6/docs/StringBooleanMap.md
new file mode 100644
index 000000000000..195a7d57677f
--- /dev/null
+++ b/samples/client/petstore/javascript-es6/docs/StringBooleanMap.md
@@ -0,0 +1,7 @@
+# OpenApiPetstore.StringBooleanMap
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+
+
diff --git a/samples/client/petstore/javascript-es6/package.json b/samples/client/petstore/javascript-es6/package.json
index df2fea63d600..b10b73e80a3f 100644
--- a/samples/client/petstore/javascript-es6/package.json
+++ b/samples/client/petstore/javascript-es6/package.json
@@ -13,7 +13,7 @@
   "dependencies": {
     "babel": "^6.23.0",
     "babel-cli": "^6.26.0",
-    "superagent": "3.5.2"
+    "superagent": "3.7.0"
   },
   "devDependencies": {
     "babel-core": "6.26.0",
diff --git a/samples/client/petstore/javascript-es6/src/api/AnotherFakeApi.js b/samples/client/petstore/javascript-es6/src/api/AnotherFakeApi.js
index 601a54725e33..6b7e708a5682 100644
--- a/samples/client/petstore/javascript-es6/src/api/AnotherFakeApi.js
+++ b/samples/client/petstore/javascript-es6/src/api/AnotherFakeApi.js
@@ -35,8 +35,8 @@ export default class AnotherFakeApi {
 
 
     /**
-     * Callback function to receive the result of the testSpecialTags operation.
-     * @callback module:api/AnotherFakeApi~testSpecialTagsCallback
+     * Callback function to receive the result of the call123testSpecialTags operation.
+     * @callback module:api/AnotherFakeApi~call123testSpecialTagsCallback
      * @param {String} error Error message, if any.
      * @param {module:model/Client} data The data returned by the service call.
      * @param {String} response The complete HTTP response.
@@ -44,17 +44,17 @@ export default class AnotherFakeApi {
 
     /**
      * To test special tags
-     * To test special tags
+     * To test special tags and operation ID starting with number
      * @param {module:model/Client} client client model
-     * @param {module:api/AnotherFakeApi~testSpecialTagsCallback} callback The callback function, accepting three arguments: error, data, response
+     * @param {module:api/AnotherFakeApi~call123testSpecialTagsCallback} callback The callback function, accepting three arguments: error, data, response
      * data is of type: {@link module:model/Client}
      */
-    testSpecialTags(client, callback) {
+    call123testSpecialTags(client, callback) {
       let postBody = client;
 
       // verify the required parameter 'client' is set
       if (client === undefined || client === null) {
-        throw new Error("Missing the required parameter 'client' when calling testSpecialTags");
+        throw new Error("Missing the required parameter 'client' when calling call123testSpecialTags");
       }
 
 
diff --git a/samples/client/petstore/javascript-es6/src/api/FakeApi.js b/samples/client/petstore/javascript-es6/src/api/FakeApi.js
index 725872e09963..b559f3607816 100644
--- a/samples/client/petstore/javascript-es6/src/api/FakeApi.js
+++ b/samples/client/petstore/javascript-es6/src/api/FakeApi.js
@@ -14,6 +14,7 @@
 
 import ApiClient from "../ApiClient";
 import Client from '../model/Client';
+import FileSchemaTestClass from '../model/FileSchemaTestClass';
 import OuterComposite from '../model/OuterComposite';
 import User from '../model/User';
 
@@ -200,6 +201,49 @@ export default class FakeApi {
       );
     }
 
+    /**
+     * Callback function to receive the result of the testBodyWithFileSchema operation.
+     * @callback module:api/FakeApi~testBodyWithFileSchemaCallback
+     * @param {String} error Error message, if any.
+     * @param data This operation does not return a value.
+     * @param {String} response The complete HTTP response.
+     */
+
+    /**
+     * For this test, the body for this request much reference a schema named `File`.
+     * @param {module:model/FileSchemaTestClass} fileSchemaTestClass 
+     * @param {module:api/FakeApi~testBodyWithFileSchemaCallback} callback The callback function, accepting three arguments: error, data, response
+     */
+    testBodyWithFileSchema(fileSchemaTestClass, callback) {
+      let postBody = fileSchemaTestClass;
+
+      // verify the required parameter 'fileSchemaTestClass' is set
+      if (fileSchemaTestClass === undefined || fileSchemaTestClass === null) {
+        throw new Error("Missing the required parameter 'fileSchemaTestClass' when calling testBodyWithFileSchema");
+      }
+
+
+      let pathParams = {
+      };
+      let queryParams = {
+      };
+      let headerParams = {
+      };
+      let formParams = {
+      };
+
+      let authNames = [];
+      let contentTypes = ['application/json'];
+      let accepts = [];
+      let returnType = null;
+
+      return this.apiClient.callApi(
+        '/fake/body-with-file-schema', 'PUT',
+        pathParams, queryParams, headerParams, formParams, postBody,
+        authNames, contentTypes, accepts, returnType, callback
+      );
+    }
+
     /**
      * Callback function to receive the result of the testBodyWithQueryParams operation.
      * @callback module:api/FakeApi~testBodyWithQueryParamsCallback
diff --git a/samples/client/petstore/javascript-es6/src/api/PetApi.js b/samples/client/petstore/javascript-es6/src/api/PetApi.js
index d6b39c8671b8..e55f6d26020a 100644
--- a/samples/client/petstore/javascript-es6/src/api/PetApi.js
+++ b/samples/client/petstore/javascript-es6/src/api/PetApi.js
@@ -408,5 +408,61 @@ export default class PetApi {
       );
     }
 
+    /**
+     * Callback function to receive the result of the uploadFileWithRequiredFile operation.
+     * @callback module:api/PetApi~uploadFileWithRequiredFileCallback
+     * @param {String} error Error message, if any.
+     * @param {module:model/ApiResponse} data The data returned by the service call.
+     * @param {String} response The complete HTTP response.
+     */
+
+    /**
+     * uploads an image (required)
+     * @param {Number} petId ID of pet to update
+     * @param {File} requiredFile file to upload
+     * @param {Object} opts Optional parameters
+     * @param {String} opts.additionalMetadata Additional data to pass to server
+     * @param {module:api/PetApi~uploadFileWithRequiredFileCallback} callback The callback function, accepting three arguments: error, data, response
+     * data is of type: {@link module:model/ApiResponse}
+     */
+    uploadFileWithRequiredFile(petId, requiredFile, opts, callback) {
+      opts = opts || {};
+      let postBody = null;
+
+      // verify the required parameter 'petId' is set
+      if (petId === undefined || petId === null) {
+        throw new Error("Missing the required parameter 'petId' when calling uploadFileWithRequiredFile");
+      }
+
+      // verify the required parameter 'requiredFile' is set
+      if (requiredFile === undefined || requiredFile === null) {
+        throw new Error("Missing the required parameter 'requiredFile' when calling uploadFileWithRequiredFile");
+      }
+
+
+      let pathParams = {
+        'petId': petId
+      };
+      let queryParams = {
+      };
+      let headerParams = {
+      };
+      let formParams = {
+        'additionalMetadata': opts['additionalMetadata'],
+        'requiredFile': requiredFile
+      };
+
+      let authNames = ['petstore_auth'];
+      let contentTypes = ['multipart/form-data'];
+      let accepts = ['application/json'];
+      let returnType = ApiResponse;
+
+      return this.apiClient.callApi(
+        '/fake/{petId}/uploadImageWithRequiredFile', 'POST',
+        pathParams, queryParams, headerParams, formParams, postBody,
+        authNames, contentTypes, accepts, returnType, callback
+      );
+    }
+
 
 }
diff --git a/samples/client/petstore/javascript-es6/src/index.js b/samples/client/petstore/javascript-es6/src/index.js
index 95bcba6b5d54..c3ca07e4c4c7 100644
--- a/samples/client/petstore/javascript-es6/src/index.js
+++ b/samples/client/petstore/javascript-es6/src/index.js
@@ -29,6 +29,8 @@ import Dog from './model/Dog';
 import EnumArrays from './model/EnumArrays';
 import EnumClass from './model/EnumClass';
 import EnumTest from './model/EnumTest';
+import File from './model/File';
+import FileSchemaTestClass from './model/FileSchemaTestClass';
 import FormatTest from './model/FormatTest';
 import HasOnlyReadOnly from './model/HasOnlyReadOnly';
 import List from './model/List';
@@ -44,6 +46,7 @@ import OuterEnum from './model/OuterEnum';
 import Pet from './model/Pet';
 import ReadOnlyFirst from './model/ReadOnlyFirst';
 import SpecialModelName from './model/SpecialModelName';
+import StringBooleanMap from './model/StringBooleanMap';
 import Tag from './model/Tag';
 import User from './model/User';
 import AnotherFakeApi from './api/AnotherFakeApi';
@@ -188,6 +191,18 @@ export {
      */
     EnumTest,
 
+    /**
+     * The File model constructor.
+     * @property {module:model/File}
+     */
+    File,
+
+    /**
+     * The FileSchemaTestClass model constructor.
+     * @property {module:model/FileSchemaTestClass}
+     */
+    FileSchemaTestClass,
+
     /**
      * The FormatTest model constructor.
      * @property {module:model/FormatTest}
@@ -278,6 +293,12 @@ export {
      */
     SpecialModelName,
 
+    /**
+     * The StringBooleanMap model constructor.
+     * @property {module:model/StringBooleanMap}
+     */
+    StringBooleanMap,
+
     /**
      * The Tag model constructor.
      * @property {module:model/Tag}
diff --git a/samples/client/petstore/javascript-es6/src/model/File.js b/samples/client/petstore/javascript-es6/src/model/File.js
new file mode 100644
index 000000000000..e29e1a0309f1
--- /dev/null
+++ b/samples/client/petstore/javascript-es6/src/model/File.js
@@ -0,0 +1,73 @@
+/**
+ * OpenAPI Petstore
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * OpenAPI spec version: 1.0.0
+ * 
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ *
+ */
+
+import ApiClient from '../ApiClient';
+
+/**
+ * The File model module.
+ * @module model/File
+ * @version 1.0.0
+ */
+class File {
+    /**
+     * Constructs a new File.
+     * Must be named `File` for test.
+     * @alias module:model/File
+     */
+    constructor() { 
+        
+        File.initialize(this);
+    }
+
+    /**
+     * Initializes the fields of this object.
+     * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
+     * Only for internal use.
+     */
+    static initialize(obj) { 
+    }
+
+    /**
+     * Constructs a File from a plain JavaScript object, optionally creating a new instance.
+     * Copies all relevant properties from data to obj if supplied or a new instance if not.
+     * @param {Object} data The plain JavaScript object bearing properties of interest.
+     * @param {module:model/File} obj Optional instance to populate.
+     * @return {module:model/File} The populated File instance.
+     */
+    static constructFromObject(data, obj) {
+        if (data) {
+            obj = obj || new File();
+
+            if (data.hasOwnProperty('sourceURI')) {
+                obj['sourceURI'] = ApiClient.convertToType(data['sourceURI'], 'String');
+            }
+        }
+        return obj;
+    }
+
+
+}
+
+/**
+ * Test capitalization
+ * @member {String} sourceURI
+ */
+File.prototype['sourceURI'] = undefined;
+
+
+
+
+
+
+export default File;
+
diff --git a/samples/client/petstore/javascript-es6/src/model/FileSchemaTestClass.js b/samples/client/petstore/javascript-es6/src/model/FileSchemaTestClass.js
new file mode 100644
index 000000000000..b4be63df0e68
--- /dev/null
+++ b/samples/client/petstore/javascript-es6/src/model/FileSchemaTestClass.js
@@ -0,0 +1,79 @@
+/**
+ * OpenAPI Petstore
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * OpenAPI spec version: 1.0.0
+ * 
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ *
+ */
+
+import ApiClient from '../ApiClient';
+
+/**
+ * The FileSchemaTestClass model module.
+ * @module model/FileSchemaTestClass
+ * @version 1.0.0
+ */
+class FileSchemaTestClass {
+    /**
+     * Constructs a new FileSchemaTestClass.
+     * @alias module:model/FileSchemaTestClass
+     */
+    constructor() { 
+        
+        FileSchemaTestClass.initialize(this);
+    }
+
+    /**
+     * Initializes the fields of this object.
+     * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
+     * Only for internal use.
+     */
+    static initialize(obj) { 
+    }
+
+    /**
+     * Constructs a FileSchemaTestClass from a plain JavaScript object, optionally creating a new instance.
+     * Copies all relevant properties from data to obj if supplied or a new instance if not.
+     * @param {Object} data The plain JavaScript object bearing properties of interest.
+     * @param {module:model/FileSchemaTestClass} obj Optional instance to populate.
+     * @return {module:model/FileSchemaTestClass} The populated FileSchemaTestClass instance.
+     */
+    static constructFromObject(data, obj) {
+        if (data) {
+            obj = obj || new FileSchemaTestClass();
+
+            if (data.hasOwnProperty('file')) {
+                obj['file'] = File.constructFromObject(data['file']);
+            }
+            if (data.hasOwnProperty('files')) {
+                obj['files'] = ApiClient.convertToType(data['files'], [File]);
+            }
+        }
+        return obj;
+    }
+
+
+}
+
+/**
+ * @member {File} file
+ */
+FileSchemaTestClass.prototype['file'] = undefined;
+
+/**
+ * @member {Array.} files
+ */
+FileSchemaTestClass.prototype['files'] = undefined;
+
+
+
+
+
+
+export default FileSchemaTestClass;
+
diff --git a/samples/client/petstore/javascript-es6/src/model/MapTest.js b/samples/client/petstore/javascript-es6/src/model/MapTest.js
index 8cc6640c9d4f..31c37d601cec 100644
--- a/samples/client/petstore/javascript-es6/src/model/MapTest.js
+++ b/samples/client/petstore/javascript-es6/src/model/MapTest.js
@@ -12,6 +12,7 @@
  */
 
 import ApiClient from '../ApiClient';
+import StringBooleanMap from './StringBooleanMap';
 
 /**
  * The MapTest model module.
@@ -53,6 +54,12 @@ class MapTest {
             if (data.hasOwnProperty('map_of_enum_string')) {
                 obj['map_of_enum_string'] = ApiClient.convertToType(data['map_of_enum_string'], {'String': 'String'});
             }
+            if (data.hasOwnProperty('direct_map')) {
+                obj['direct_map'] = ApiClient.convertToType(data['direct_map'], {'String': 'Boolean'});
+            }
+            if (data.hasOwnProperty('indirect_map')) {
+                obj['indirect_map'] = StringBooleanMap.constructFromObject(data['indirect_map']);
+            }
         }
         return obj;
     }
@@ -70,6 +77,16 @@ MapTest.prototype['map_map_of_string'] = undefined;
  */
 MapTest.prototype['map_of_enum_string'] = undefined;
 
+/**
+ * @member {Object.} direct_map
+ */
+MapTest.prototype['direct_map'] = undefined;
+
+/**
+ * @member {module:model/StringBooleanMap} indirect_map
+ */
+MapTest.prototype['indirect_map'] = undefined;
+
 
 
 
diff --git a/samples/client/petstore/javascript-es6/src/model/OuterComposite.js b/samples/client/petstore/javascript-es6/src/model/OuterComposite.js
index 8b61cb8f654b..ba597462eec6 100644
--- a/samples/client/petstore/javascript-es6/src/model/OuterComposite.js
+++ b/samples/client/petstore/javascript-es6/src/model/OuterComposite.js
@@ -48,13 +48,13 @@ class OuterComposite {
             obj = obj || new OuterComposite();
 
             if (data.hasOwnProperty('my_number')) {
-                obj['my_number'] = 'Number'.constructFromObject(data['my_number']);
+                obj['my_number'] = ApiClient.convertToType(data['my_number'], 'Number');
             }
             if (data.hasOwnProperty('my_string')) {
-                obj['my_string'] = 'String'.constructFromObject(data['my_string']);
+                obj['my_string'] = ApiClient.convertToType(data['my_string'], 'String');
             }
             if (data.hasOwnProperty('my_boolean')) {
-                obj['my_boolean'] = 'Boolean'.constructFromObject(data['my_boolean']);
+                obj['my_boolean'] = ApiClient.convertToType(data['my_boolean'], 'Boolean');
             }
         }
         return obj;
diff --git a/samples/client/petstore/javascript-es6/src/model/StringBooleanMap.js b/samples/client/petstore/javascript-es6/src/model/StringBooleanMap.js
new file mode 100644
index 000000000000..30172b33f7b9
--- /dev/null
+++ b/samples/client/petstore/javascript-es6/src/model/StringBooleanMap.js
@@ -0,0 +1,67 @@
+/**
+ * OpenAPI Petstore
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * OpenAPI spec version: 1.0.0
+ * 
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ *
+ */
+
+import ApiClient from '../ApiClient';
+
+/**
+ * The StringBooleanMap model module.
+ * @module model/StringBooleanMap
+ * @version 1.0.0
+ */
+class StringBooleanMap {
+    /**
+     * Constructs a new StringBooleanMap.
+     * @alias module:model/StringBooleanMap
+     * @extends Object
+     */
+    constructor() { 
+        
+        StringBooleanMap.initialize(this);
+    }
+
+    /**
+     * Initializes the fields of this object.
+     * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
+     * Only for internal use.
+     */
+    static initialize(obj) { 
+    }
+
+    /**
+     * Constructs a StringBooleanMap from a plain JavaScript object, optionally creating a new instance.
+     * Copies all relevant properties from data to obj if supplied or a new instance if not.
+     * @param {Object} data The plain JavaScript object bearing properties of interest.
+     * @param {module:model/StringBooleanMap} obj Optional instance to populate.
+     * @return {module:model/StringBooleanMap} The populated StringBooleanMap instance.
+     */
+    static constructFromObject(data, obj) {
+        if (data) {
+            obj = obj || new StringBooleanMap();
+
+            ApiClient.constructFromObject(data, obj, 'Boolean');
+            
+
+        }
+        return obj;
+    }
+
+
+}
+
+
+
+
+
+
+export default StringBooleanMap;
+
diff --git a/samples/client/petstore/javascript-es6/test/model/File.spec.js b/samples/client/petstore/javascript-es6/test/model/File.spec.js
new file mode 100644
index 000000000000..10666dc53c7c
--- /dev/null
+++ b/samples/client/petstore/javascript-es6/test/model/File.spec.js
@@ -0,0 +1,65 @@
+/**
+ * OpenAPI Petstore
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * OpenAPI spec version: 1.0.0
+ * 
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ *
+ */
+
+(function(root, factory) {
+  if (typeof define === 'function' && define.amd) {
+    // AMD.
+    define(['expect.js', '../../src/index'], factory);
+  } else if (typeof module === 'object' && module.exports) {
+    // CommonJS-like environments that support module.exports, like Node.
+    factory(require('expect.js'), require('../../src/index'));
+  } else {
+    // Browser globals (root is window)
+    factory(root.expect, root.OpenApiPetstore);
+  }
+}(this, function(expect, OpenApiPetstore) {
+  'use strict';
+
+  var instance;
+
+  beforeEach(function() {
+    instance = new OpenApiPetstore.File();
+  });
+
+  var getProperty = function(object, getter, property) {
+    // Use getter method if present; otherwise, get the property directly.
+    if (typeof object[getter] === 'function')
+      return object[getter]();
+    else
+      return object[property];
+  }
+
+  var setProperty = function(object, setter, property, value) {
+    // Use setter method if present; otherwise, set the property directly.
+    if (typeof object[setter] === 'function')
+      object[setter](value);
+    else
+      object[property] = value;
+  }
+
+  describe('File', function() {
+    it('should create an instance of File', function() {
+      // uncomment below and update the code to test File
+      //var instane = new OpenApiPetstore.File();
+      //expect(instance).to.be.a(OpenApiPetstore.File);
+    });
+
+    it('should have the property sourceURI (base name: "sourceURI")', function() {
+      // uncomment below and update the code to test the property sourceURI
+      //var instane = new OpenApiPetstore.File();
+      //expect(instance).to.be();
+    });
+
+  });
+
+}));
diff --git a/samples/client/petstore/javascript-es6/test/model/FileSchemaTestClass.spec.js b/samples/client/petstore/javascript-es6/test/model/FileSchemaTestClass.spec.js
new file mode 100644
index 000000000000..d6e49689d232
--- /dev/null
+++ b/samples/client/petstore/javascript-es6/test/model/FileSchemaTestClass.spec.js
@@ -0,0 +1,71 @@
+/**
+ * OpenAPI Petstore
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * OpenAPI spec version: 1.0.0
+ * 
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ *
+ */
+
+(function(root, factory) {
+  if (typeof define === 'function' && define.amd) {
+    // AMD.
+    define(['expect.js', '../../src/index'], factory);
+  } else if (typeof module === 'object' && module.exports) {
+    // CommonJS-like environments that support module.exports, like Node.
+    factory(require('expect.js'), require('../../src/index'));
+  } else {
+    // Browser globals (root is window)
+    factory(root.expect, root.OpenApiPetstore);
+  }
+}(this, function(expect, OpenApiPetstore) {
+  'use strict';
+
+  var instance;
+
+  beforeEach(function() {
+    instance = new OpenApiPetstore.FileSchemaTestClass();
+  });
+
+  var getProperty = function(object, getter, property) {
+    // Use getter method if present; otherwise, get the property directly.
+    if (typeof object[getter] === 'function')
+      return object[getter]();
+    else
+      return object[property];
+  }
+
+  var setProperty = function(object, setter, property, value) {
+    // Use setter method if present; otherwise, set the property directly.
+    if (typeof object[setter] === 'function')
+      object[setter](value);
+    else
+      object[property] = value;
+  }
+
+  describe('FileSchemaTestClass', function() {
+    it('should create an instance of FileSchemaTestClass', function() {
+      // uncomment below and update the code to test FileSchemaTestClass
+      //var instane = new OpenApiPetstore.FileSchemaTestClass();
+      //expect(instance).to.be.a(OpenApiPetstore.FileSchemaTestClass);
+    });
+
+    it('should have the property file (base name: "file")', function() {
+      // uncomment below and update the code to test the property file
+      //var instane = new OpenApiPetstore.FileSchemaTestClass();
+      //expect(instance).to.be();
+    });
+
+    it('should have the property files (base name: "files")', function() {
+      // uncomment below and update the code to test the property files
+      //var instane = new OpenApiPetstore.FileSchemaTestClass();
+      //expect(instance).to.be();
+    });
+
+  });
+
+}));
diff --git a/samples/client/petstore/javascript-es6/test/model/StringBooleanMap.spec.js b/samples/client/petstore/javascript-es6/test/model/StringBooleanMap.spec.js
new file mode 100644
index 000000000000..0fd499cc819e
--- /dev/null
+++ b/samples/client/petstore/javascript-es6/test/model/StringBooleanMap.spec.js
@@ -0,0 +1,59 @@
+/**
+ * OpenAPI Petstore
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * OpenAPI spec version: 1.0.0
+ * 
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ *
+ */
+
+(function(root, factory) {
+  if (typeof define === 'function' && define.amd) {
+    // AMD.
+    define(['expect.js', '../../src/index'], factory);
+  } else if (typeof module === 'object' && module.exports) {
+    // CommonJS-like environments that support module.exports, like Node.
+    factory(require('expect.js'), require('../../src/index'));
+  } else {
+    // Browser globals (root is window)
+    factory(root.expect, root.OpenApiPetstore);
+  }
+}(this, function(expect, OpenApiPetstore) {
+  'use strict';
+
+  var instance;
+
+  beforeEach(function() {
+    instance = new OpenApiPetstore.StringBooleanMap();
+  });
+
+  var getProperty = function(object, getter, property) {
+    // Use getter method if present; otherwise, get the property directly.
+    if (typeof object[getter] === 'function')
+      return object[getter]();
+    else
+      return object[property];
+  }
+
+  var setProperty = function(object, setter, property, value) {
+    // Use setter method if present; otherwise, set the property directly.
+    if (typeof object[setter] === 'function')
+      object[setter](value);
+    else
+      object[property] = value;
+  }
+
+  describe('StringBooleanMap', function() {
+    it('should create an instance of StringBooleanMap', function() {
+      // uncomment below and update the code to test StringBooleanMap
+      //var instane = new OpenApiPetstore.StringBooleanMap();
+      //expect(instance).to.be.a(OpenApiPetstore.StringBooleanMap);
+    });
+
+  });
+
+}));
diff --git a/samples/client/petstore/javascript-promise-es6/.openapi-generator/VERSION b/samples/client/petstore/javascript-promise-es6/.openapi-generator/VERSION
index 1c00c5181548..14900cee60e8 100644
--- a/samples/client/petstore/javascript-promise-es6/.openapi-generator/VERSION
+++ b/samples/client/petstore/javascript-promise-es6/.openapi-generator/VERSION
@@ -1 +1 @@
-3.0.2-SNAPSHOT
\ No newline at end of file
+3.2.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/javascript-promise-es6/README.md b/samples/client/petstore/javascript-promise-es6/README.md
index fa41841dab26..46b329b1bc4c 100644
--- a/samples/client/petstore/javascript-promise-es6/README.md
+++ b/samples/client/petstore/javascript-promise-es6/README.md
@@ -73,7 +73,7 @@ var OpenApiPetstore = require('open_api_petstore');
 
 var api = new OpenApiPetstore.AnotherFakeApi()
 var client = new OpenApiPetstore.Client(); // {Client} client model
-api.testSpecialTags(client).then(function(data) {
+api.call123testSpecialTags(client).then(function(data) {
   console.log('API called successfully. Returned data: ' + data);
 }, function(error) {
   console.error(error);
@@ -88,11 +88,12 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
 
 Class | Method | HTTP request | Description
 ------------ | ------------- | ------------- | -------------
-*OpenApiPetstore.AnotherFakeApi* | [**testSpecialTags**](docs/AnotherFakeApi.md#testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags
+*OpenApiPetstore.AnotherFakeApi* | [**call123testSpecialTags**](docs/AnotherFakeApi.md#call123testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags
 *OpenApiPetstore.FakeApi* | [**fakeOuterBooleanSerialize**](docs/FakeApi.md#fakeOuterBooleanSerialize) | **POST** /fake/outer/boolean | 
 *OpenApiPetstore.FakeApi* | [**fakeOuterCompositeSerialize**](docs/FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite | 
 *OpenApiPetstore.FakeApi* | [**fakeOuterNumberSerialize**](docs/FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number | 
 *OpenApiPetstore.FakeApi* | [**fakeOuterStringSerialize**](docs/FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string | 
+*OpenApiPetstore.FakeApi* | [**testBodyWithFileSchema**](docs/FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | 
 *OpenApiPetstore.FakeApi* | [**testBodyWithQueryParams**](docs/FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | 
 *OpenApiPetstore.FakeApi* | [**testClientModel**](docs/FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model
 *OpenApiPetstore.FakeApi* | [**testEndpointParameters**](docs/FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 
@@ -108,6 +109,7 @@ Class | Method | HTTP request | Description
 *OpenApiPetstore.PetApi* | [**updatePet**](docs/PetApi.md#updatePet) | **PUT** /pet | Update an existing pet
 *OpenApiPetstore.PetApi* | [**updatePetWithForm**](docs/PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data
 *OpenApiPetstore.PetApi* | [**uploadFile**](docs/PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image
+*OpenApiPetstore.PetApi* | [**uploadFileWithRequiredFile**](docs/PetApi.md#uploadFileWithRequiredFile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required)
 *OpenApiPetstore.StoreApi* | [**deleteOrder**](docs/StoreApi.md#deleteOrder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID
 *OpenApiPetstore.StoreApi* | [**getInventory**](docs/StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status
 *OpenApiPetstore.StoreApi* | [**getOrderById**](docs/StoreApi.md#getOrderById) | **GET** /store/order/{order_id} | Find purchase order by ID
@@ -140,6 +142,8 @@ Class | Method | HTTP request | Description
  - [OpenApiPetstore.EnumArrays](docs/EnumArrays.md)
  - [OpenApiPetstore.EnumClass](docs/EnumClass.md)
  - [OpenApiPetstore.EnumTest](docs/EnumTest.md)
+ - [OpenApiPetstore.File](docs/File.md)
+ - [OpenApiPetstore.FileSchemaTestClass](docs/FileSchemaTestClass.md)
  - [OpenApiPetstore.FormatTest](docs/FormatTest.md)
  - [OpenApiPetstore.HasOnlyReadOnly](docs/HasOnlyReadOnly.md)
  - [OpenApiPetstore.List](docs/List.md)
@@ -155,6 +159,7 @@ Class | Method | HTTP request | Description
  - [OpenApiPetstore.Pet](docs/Pet.md)
  - [OpenApiPetstore.ReadOnlyFirst](docs/ReadOnlyFirst.md)
  - [OpenApiPetstore.SpecialModelName](docs/SpecialModelName.md)
+ - [OpenApiPetstore.StringBooleanMap](docs/StringBooleanMap.md)
  - [OpenApiPetstore.Tag](docs/Tag.md)
  - [OpenApiPetstore.User](docs/User.md)
 
diff --git a/samples/client/petstore/javascript-promise-es6/docs/AnotherFakeApi.md b/samples/client/petstore/javascript-promise-es6/docs/AnotherFakeApi.md
index 2eccfe5f4798..74ad8b2f00c2 100644
--- a/samples/client/petstore/javascript-promise-es6/docs/AnotherFakeApi.md
+++ b/samples/client/petstore/javascript-promise-es6/docs/AnotherFakeApi.md
@@ -4,16 +4,16 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
 
 Method | HTTP request | Description
 ------------- | ------------- | -------------
-[**testSpecialTags**](AnotherFakeApi.md#testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags
+[**call123testSpecialTags**](AnotherFakeApi.md#call123testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags
 
 
-
-# **testSpecialTags**
-> Client testSpecialTags(client)
+
+# **call123testSpecialTags**
+> Client call123testSpecialTags(client)
 
 To test special tags
 
-To test special tags
+To test special tags and operation ID starting with number
 
 ### Example
 ```javascript
@@ -21,7 +21,7 @@ import OpenApiPetstore from 'open_api_petstore';
 
 let apiInstance = new OpenApiPetstore.AnotherFakeApi();
 let client = new OpenApiPetstore.Client(); // Client | client model
-apiInstance.testSpecialTags(client).then((data) => {
+apiInstance.call123testSpecialTags(client).then((data) => {
   console.log('API called successfully. Returned data: ' + data);
 }, (error) => {
   console.error(error);
diff --git a/samples/client/petstore/javascript-promise-es6/docs/FakeApi.md b/samples/client/petstore/javascript-promise-es6/docs/FakeApi.md
index 8a2a57c8b669..bb62b487674a 100644
--- a/samples/client/petstore/javascript-promise-es6/docs/FakeApi.md
+++ b/samples/client/petstore/javascript-promise-es6/docs/FakeApi.md
@@ -8,6 +8,7 @@ Method | HTTP request | Description
 [**fakeOuterCompositeSerialize**](FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite | 
 [**fakeOuterNumberSerialize**](FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number | 
 [**fakeOuterStringSerialize**](FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string | 
+[**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | 
 [**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | 
 [**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model
 [**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 
@@ -188,6 +189,47 @@ No authorization required
  - **Content-Type**: Not defined
  - **Accept**: */*
 
+
+# **testBodyWithFileSchema**
+> testBodyWithFileSchema(fileSchemaTestClass)
+
+
+
+For this test, the body for this request much reference a schema named `File`.
+
+### Example
+```javascript
+import OpenApiPetstore from 'open_api_petstore';
+
+let apiInstance = new OpenApiPetstore.FakeApi();
+let fileSchemaTestClass = new OpenApiPetstore.FileSchemaTestClass(); // FileSchemaTestClass | 
+apiInstance.testBodyWithFileSchema(fileSchemaTestClass).then(() => {
+  console.log('API called successfully.');
+}, (error) => {
+  console.error(error);
+});
+
+```
+
+### Parameters
+
+Name | Type | Description  | Notes
+------------- | ------------- | ------------- | -------------
+ **fileSchemaTestClass** | [**FileSchemaTestClass**](FileSchemaTestClass.md)|  | 
+
+### Return type
+
+null (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: Not defined
+
 
 # **testBodyWithQueryParams**
 > testBodyWithQueryParams(query, user)
diff --git a/samples/client/petstore/javascript-promise-es6/docs/File.md b/samples/client/petstore/javascript-promise-es6/docs/File.md
new file mode 100644
index 000000000000..a34d76a3e46e
--- /dev/null
+++ b/samples/client/petstore/javascript-promise-es6/docs/File.md
@@ -0,0 +1,8 @@
+# OpenApiPetstore.File
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**sourceURI** | **String** | Test capitalization | [optional] 
+
+
diff --git a/samples/client/petstore/javascript-promise-es6/docs/FileSchemaTestClass.md b/samples/client/petstore/javascript-promise-es6/docs/FileSchemaTestClass.md
new file mode 100644
index 000000000000..3ccb4162dcc1
--- /dev/null
+++ b/samples/client/petstore/javascript-promise-es6/docs/FileSchemaTestClass.md
@@ -0,0 +1,9 @@
+# OpenApiPetstore.FileSchemaTestClass
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**file** | **File** |  | [optional] 
+**files** | **[File]** |  | [optional] 
+
+
diff --git a/samples/client/petstore/javascript-promise-es6/docs/MapTest.md b/samples/client/petstore/javascript-promise-es6/docs/MapTest.md
index 4a128da00fd0..f1075bf0681f 100644
--- a/samples/client/petstore/javascript-promise-es6/docs/MapTest.md
+++ b/samples/client/petstore/javascript-promise-es6/docs/MapTest.md
@@ -5,6 +5,8 @@ Name | Type | Description | Notes
 ------------ | ------------- | ------------- | -------------
 **mapMapOfString** | **{String: {String: String}}** |  | [optional] 
 **mapOfEnumString** | **{String: String}** |  | [optional] 
+**directMap** | **{String: Boolean}** |  | [optional] 
+**indirectMap** | [**StringBooleanMap**](StringBooleanMap.md) |  | [optional] 
 
 
 
diff --git a/samples/client/petstore/javascript-promise-es6/docs/PetApi.md b/samples/client/petstore/javascript-promise-es6/docs/PetApi.md
index 3a402233a9ec..1978431440fe 100644
--- a/samples/client/petstore/javascript-promise-es6/docs/PetApi.md
+++ b/samples/client/petstore/javascript-promise-es6/docs/PetApi.md
@@ -12,6 +12,7 @@ Method | HTTP request | Description
 [**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet
 [**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data
 [**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image
+[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required)
 
 
 
@@ -390,3 +391,53 @@ Name | Type | Description  | Notes
  - **Content-Type**: multipart/form-data
  - **Accept**: application/json
 
+
+# **uploadFileWithRequiredFile**
+> ApiResponse uploadFileWithRequiredFile(petId, requiredFile, opts)
+
+uploads an image (required)
+
+### Example
+```javascript
+import OpenApiPetstore from 'open_api_petstore';
+let defaultClient = OpenApiPetstore.ApiClient.instance;
+
+// Configure OAuth2 access token for authorization: petstore_auth
+let petstore_auth = defaultClient.authentications['petstore_auth'];
+petstore_auth.accessToken = 'YOUR ACCESS TOKEN';
+
+let apiInstance = new OpenApiPetstore.PetApi();
+let petId = 789; // Number | ID of pet to update
+let requiredFile = "/path/to/file"; // File | file to upload
+let opts = {
+  'additionalMetadata': "additionalMetadata_example" // String | Additional data to pass to server
+};
+apiInstance.uploadFileWithRequiredFile(petId, requiredFile, opts).then((data) => {
+  console.log('API called successfully. Returned data: ' + data);
+}, (error) => {
+  console.error(error);
+});
+
+```
+
+### Parameters
+
+Name | Type | Description  | Notes
+------------- | ------------- | ------------- | -------------
+ **petId** | **Number**| ID of pet to update | 
+ **requiredFile** | **File**| file to upload | 
+ **additionalMetadata** | **String**| Additional data to pass to server | [optional] 
+
+### Return type
+
+[**ApiResponse**](ApiResponse.md)
+
+### Authorization
+
+[petstore_auth](../README.md#petstore_auth)
+
+### HTTP request headers
+
+ - **Content-Type**: multipart/form-data
+ - **Accept**: application/json
+
diff --git a/samples/client/petstore/javascript-promise-es6/docs/StringBooleanMap.md b/samples/client/petstore/javascript-promise-es6/docs/StringBooleanMap.md
new file mode 100644
index 000000000000..195a7d57677f
--- /dev/null
+++ b/samples/client/petstore/javascript-promise-es6/docs/StringBooleanMap.md
@@ -0,0 +1,7 @@
+# OpenApiPetstore.StringBooleanMap
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+
+
diff --git a/samples/client/petstore/javascript-promise-es6/package.json b/samples/client/petstore/javascript-promise-es6/package.json
index df2fea63d600..b10b73e80a3f 100644
--- a/samples/client/petstore/javascript-promise-es6/package.json
+++ b/samples/client/petstore/javascript-promise-es6/package.json
@@ -13,7 +13,7 @@
   "dependencies": {
     "babel": "^6.23.0",
     "babel-cli": "^6.26.0",
-    "superagent": "3.5.2"
+    "superagent": "3.7.0"
   },
   "devDependencies": {
     "babel-core": "6.26.0",
diff --git a/samples/client/petstore/javascript-promise-es6/src/api/AnotherFakeApi.js b/samples/client/petstore/javascript-promise-es6/src/api/AnotherFakeApi.js
index a9a409d6336a..17dc83517bbb 100644
--- a/samples/client/petstore/javascript-promise-es6/src/api/AnotherFakeApi.js
+++ b/samples/client/petstore/javascript-promise-es6/src/api/AnotherFakeApi.js
@@ -37,16 +37,16 @@ export default class AnotherFakeApi {
 
     /**
      * To test special tags
-     * To test special tags
+     * To test special tags and operation ID starting with number
      * @param {module:model/Client} client client model
      * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Client} and HTTP response
      */
-    testSpecialTagsWithHttpInfo(client) {
+    call123testSpecialTagsWithHttpInfo(client) {
       let postBody = client;
 
       // verify the required parameter 'client' is set
       if (client === undefined || client === null) {
-        throw new Error("Missing the required parameter 'client' when calling testSpecialTags");
+        throw new Error("Missing the required parameter 'client' when calling call123testSpecialTags");
       }
 
 
@@ -73,12 +73,12 @@ export default class AnotherFakeApi {
 
     /**
      * To test special tags
-     * To test special tags
+     * To test special tags and operation ID starting with number
      * @param {module:model/Client} client client model
      * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Client}
      */
-    testSpecialTags(client) {
-      return this.testSpecialTagsWithHttpInfo(client)
+    call123testSpecialTags(client) {
+      return this.call123testSpecialTagsWithHttpInfo(client)
         .then(function(response_and_data) {
           return response_and_data.data;
         });
diff --git a/samples/client/petstore/javascript-promise-es6/src/api/FakeApi.js b/samples/client/petstore/javascript-promise-es6/src/api/FakeApi.js
index 87cfae006597..63650ef631b1 100644
--- a/samples/client/petstore/javascript-promise-es6/src/api/FakeApi.js
+++ b/samples/client/petstore/javascript-promise-es6/src/api/FakeApi.js
@@ -14,6 +14,7 @@
 
 import ApiClient from "../ApiClient";
 import Client from '../model/Client';
+import FileSchemaTestClass from '../model/FileSchemaTestClass';
 import OuterComposite from '../model/OuterComposite';
 import User from '../model/User';
 
@@ -221,6 +222,54 @@ export default class FakeApi {
     }
 
 
+    /**
+     * For this test, the body for this request much reference a schema named `File`.
+     * @param {module:model/FileSchemaTestClass} fileSchemaTestClass 
+     * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
+     */
+    testBodyWithFileSchemaWithHttpInfo(fileSchemaTestClass) {
+      let postBody = fileSchemaTestClass;
+
+      // verify the required parameter 'fileSchemaTestClass' is set
+      if (fileSchemaTestClass === undefined || fileSchemaTestClass === null) {
+        throw new Error("Missing the required parameter 'fileSchemaTestClass' when calling testBodyWithFileSchema");
+      }
+
+
+      let pathParams = {
+      };
+      let queryParams = {
+      };
+      let headerParams = {
+      };
+      let formParams = {
+      };
+
+      let authNames = [];
+      let contentTypes = ['application/json'];
+      let accepts = [];
+      let returnType = null;
+
+      return this.apiClient.callApi(
+        '/fake/body-with-file-schema', 'PUT',
+        pathParams, queryParams, headerParams, formParams, postBody,
+        authNames, contentTypes, accepts, returnType
+      );
+    }
+
+    /**
+     * For this test, the body for this request much reference a schema named `File`.
+     * @param {module:model/FileSchemaTestClass} fileSchemaTestClass 
+     * @return {Promise} a {@link https://www.promisejs.org/|Promise}
+     */
+    testBodyWithFileSchema(fileSchemaTestClass) {
+      return this.testBodyWithFileSchemaWithHttpInfo(fileSchemaTestClass)
+        .then(function(response_and_data) {
+          return response_and_data.data;
+        });
+    }
+
+
     /**
      * @param {String} query 
      * @param {module:model/User} user 
diff --git a/samples/client/petstore/javascript-promise-es6/src/api/PetApi.js b/samples/client/petstore/javascript-promise-es6/src/api/PetApi.js
index a8a8d91c9502..cd180e898eb8 100644
--- a/samples/client/petstore/javascript-promise-es6/src/api/PetApi.js
+++ b/samples/client/petstore/javascript-promise-es6/src/api/PetApi.js
@@ -456,4 +456,67 @@ export default class PetApi {
     }
 
 
+    /**
+     * uploads an image (required)
+     * @param {Number} petId ID of pet to update
+     * @param {File} requiredFile file to upload
+     * @param {Object} opts Optional parameters
+     * @param {String} opts.additionalMetadata Additional data to pass to server
+     * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ApiResponse} and HTTP response
+     */
+    uploadFileWithRequiredFileWithHttpInfo(petId, requiredFile, opts) {
+      opts = opts || {};
+      let postBody = null;
+
+      // verify the required parameter 'petId' is set
+      if (petId === undefined || petId === null) {
+        throw new Error("Missing the required parameter 'petId' when calling uploadFileWithRequiredFile");
+      }
+
+      // verify the required parameter 'requiredFile' is set
+      if (requiredFile === undefined || requiredFile === null) {
+        throw new Error("Missing the required parameter 'requiredFile' when calling uploadFileWithRequiredFile");
+      }
+
+
+      let pathParams = {
+        'petId': petId
+      };
+      let queryParams = {
+      };
+      let headerParams = {
+      };
+      let formParams = {
+        'additionalMetadata': opts['additionalMetadata'],
+        'requiredFile': requiredFile
+      };
+
+      let authNames = ['petstore_auth'];
+      let contentTypes = ['multipart/form-data'];
+      let accepts = ['application/json'];
+      let returnType = ApiResponse;
+
+      return this.apiClient.callApi(
+        '/fake/{petId}/uploadImageWithRequiredFile', 'POST',
+        pathParams, queryParams, headerParams, formParams, postBody,
+        authNames, contentTypes, accepts, returnType
+      );
+    }
+
+    /**
+     * uploads an image (required)
+     * @param {Number} petId ID of pet to update
+     * @param {File} requiredFile file to upload
+     * @param {Object} opts Optional parameters
+     * @param {String} opts.additionalMetadata Additional data to pass to server
+     * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ApiResponse}
+     */
+    uploadFileWithRequiredFile(petId, requiredFile, opts) {
+      return this.uploadFileWithRequiredFileWithHttpInfo(petId, requiredFile, opts)
+        .then(function(response_and_data) {
+          return response_and_data.data;
+        });
+    }
+
+
 }
diff --git a/samples/client/petstore/javascript-promise-es6/src/index.js b/samples/client/petstore/javascript-promise-es6/src/index.js
index 95bcba6b5d54..c3ca07e4c4c7 100644
--- a/samples/client/petstore/javascript-promise-es6/src/index.js
+++ b/samples/client/petstore/javascript-promise-es6/src/index.js
@@ -29,6 +29,8 @@ import Dog from './model/Dog';
 import EnumArrays from './model/EnumArrays';
 import EnumClass from './model/EnumClass';
 import EnumTest from './model/EnumTest';
+import File from './model/File';
+import FileSchemaTestClass from './model/FileSchemaTestClass';
 import FormatTest from './model/FormatTest';
 import HasOnlyReadOnly from './model/HasOnlyReadOnly';
 import List from './model/List';
@@ -44,6 +46,7 @@ import OuterEnum from './model/OuterEnum';
 import Pet from './model/Pet';
 import ReadOnlyFirst from './model/ReadOnlyFirst';
 import SpecialModelName from './model/SpecialModelName';
+import StringBooleanMap from './model/StringBooleanMap';
 import Tag from './model/Tag';
 import User from './model/User';
 import AnotherFakeApi from './api/AnotherFakeApi';
@@ -188,6 +191,18 @@ export {
      */
     EnumTest,
 
+    /**
+     * The File model constructor.
+     * @property {module:model/File}
+     */
+    File,
+
+    /**
+     * The FileSchemaTestClass model constructor.
+     * @property {module:model/FileSchemaTestClass}
+     */
+    FileSchemaTestClass,
+
     /**
      * The FormatTest model constructor.
      * @property {module:model/FormatTest}
@@ -278,6 +293,12 @@ export {
      */
     SpecialModelName,
 
+    /**
+     * The StringBooleanMap model constructor.
+     * @property {module:model/StringBooleanMap}
+     */
+    StringBooleanMap,
+
     /**
      * The Tag model constructor.
      * @property {module:model/Tag}
diff --git a/samples/client/petstore/javascript-promise-es6/src/model/File.js b/samples/client/petstore/javascript-promise-es6/src/model/File.js
new file mode 100644
index 000000000000..e29e1a0309f1
--- /dev/null
+++ b/samples/client/petstore/javascript-promise-es6/src/model/File.js
@@ -0,0 +1,73 @@
+/**
+ * OpenAPI Petstore
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * OpenAPI spec version: 1.0.0
+ * 
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ *
+ */
+
+import ApiClient from '../ApiClient';
+
+/**
+ * The File model module.
+ * @module model/File
+ * @version 1.0.0
+ */
+class File {
+    /**
+     * Constructs a new File.
+     * Must be named `File` for test.
+     * @alias module:model/File
+     */
+    constructor() { 
+        
+        File.initialize(this);
+    }
+
+    /**
+     * Initializes the fields of this object.
+     * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
+     * Only for internal use.
+     */
+    static initialize(obj) { 
+    }
+
+    /**
+     * Constructs a File from a plain JavaScript object, optionally creating a new instance.
+     * Copies all relevant properties from data to obj if supplied or a new instance if not.
+     * @param {Object} data The plain JavaScript object bearing properties of interest.
+     * @param {module:model/File} obj Optional instance to populate.
+     * @return {module:model/File} The populated File instance.
+     */
+    static constructFromObject(data, obj) {
+        if (data) {
+            obj = obj || new File();
+
+            if (data.hasOwnProperty('sourceURI')) {
+                obj['sourceURI'] = ApiClient.convertToType(data['sourceURI'], 'String');
+            }
+        }
+        return obj;
+    }
+
+
+}
+
+/**
+ * Test capitalization
+ * @member {String} sourceURI
+ */
+File.prototype['sourceURI'] = undefined;
+
+
+
+
+
+
+export default File;
+
diff --git a/samples/client/petstore/javascript-promise-es6/src/model/FileSchemaTestClass.js b/samples/client/petstore/javascript-promise-es6/src/model/FileSchemaTestClass.js
new file mode 100644
index 000000000000..b4be63df0e68
--- /dev/null
+++ b/samples/client/petstore/javascript-promise-es6/src/model/FileSchemaTestClass.js
@@ -0,0 +1,79 @@
+/**
+ * OpenAPI Petstore
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * OpenAPI spec version: 1.0.0
+ * 
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ *
+ */
+
+import ApiClient from '../ApiClient';
+
+/**
+ * The FileSchemaTestClass model module.
+ * @module model/FileSchemaTestClass
+ * @version 1.0.0
+ */
+class FileSchemaTestClass {
+    /**
+     * Constructs a new FileSchemaTestClass.
+     * @alias module:model/FileSchemaTestClass
+     */
+    constructor() { 
+        
+        FileSchemaTestClass.initialize(this);
+    }
+
+    /**
+     * Initializes the fields of this object.
+     * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
+     * Only for internal use.
+     */
+    static initialize(obj) { 
+    }
+
+    /**
+     * Constructs a FileSchemaTestClass from a plain JavaScript object, optionally creating a new instance.
+     * Copies all relevant properties from data to obj if supplied or a new instance if not.
+     * @param {Object} data The plain JavaScript object bearing properties of interest.
+     * @param {module:model/FileSchemaTestClass} obj Optional instance to populate.
+     * @return {module:model/FileSchemaTestClass} The populated FileSchemaTestClass instance.
+     */
+    static constructFromObject(data, obj) {
+        if (data) {
+            obj = obj || new FileSchemaTestClass();
+
+            if (data.hasOwnProperty('file')) {
+                obj['file'] = File.constructFromObject(data['file']);
+            }
+            if (data.hasOwnProperty('files')) {
+                obj['files'] = ApiClient.convertToType(data['files'], [File]);
+            }
+        }
+        return obj;
+    }
+
+
+}
+
+/**
+ * @member {File} file
+ */
+FileSchemaTestClass.prototype['file'] = undefined;
+
+/**
+ * @member {Array.} files
+ */
+FileSchemaTestClass.prototype['files'] = undefined;
+
+
+
+
+
+
+export default FileSchemaTestClass;
+
diff --git a/samples/client/petstore/javascript-promise-es6/src/model/MapTest.js b/samples/client/petstore/javascript-promise-es6/src/model/MapTest.js
index 8cc6640c9d4f..31c37d601cec 100644
--- a/samples/client/petstore/javascript-promise-es6/src/model/MapTest.js
+++ b/samples/client/petstore/javascript-promise-es6/src/model/MapTest.js
@@ -12,6 +12,7 @@
  */
 
 import ApiClient from '../ApiClient';
+import StringBooleanMap from './StringBooleanMap';
 
 /**
  * The MapTest model module.
@@ -53,6 +54,12 @@ class MapTest {
             if (data.hasOwnProperty('map_of_enum_string')) {
                 obj['map_of_enum_string'] = ApiClient.convertToType(data['map_of_enum_string'], {'String': 'String'});
             }
+            if (data.hasOwnProperty('direct_map')) {
+                obj['direct_map'] = ApiClient.convertToType(data['direct_map'], {'String': 'Boolean'});
+            }
+            if (data.hasOwnProperty('indirect_map')) {
+                obj['indirect_map'] = StringBooleanMap.constructFromObject(data['indirect_map']);
+            }
         }
         return obj;
     }
@@ -70,6 +77,16 @@ MapTest.prototype['map_map_of_string'] = undefined;
  */
 MapTest.prototype['map_of_enum_string'] = undefined;
 
+/**
+ * @member {Object.} direct_map
+ */
+MapTest.prototype['direct_map'] = undefined;
+
+/**
+ * @member {module:model/StringBooleanMap} indirect_map
+ */
+MapTest.prototype['indirect_map'] = undefined;
+
 
 
 
diff --git a/samples/client/petstore/javascript-promise-es6/src/model/OuterComposite.js b/samples/client/petstore/javascript-promise-es6/src/model/OuterComposite.js
index 8b61cb8f654b..ba597462eec6 100644
--- a/samples/client/petstore/javascript-promise-es6/src/model/OuterComposite.js
+++ b/samples/client/petstore/javascript-promise-es6/src/model/OuterComposite.js
@@ -48,13 +48,13 @@ class OuterComposite {
             obj = obj || new OuterComposite();
 
             if (data.hasOwnProperty('my_number')) {
-                obj['my_number'] = 'Number'.constructFromObject(data['my_number']);
+                obj['my_number'] = ApiClient.convertToType(data['my_number'], 'Number');
             }
             if (data.hasOwnProperty('my_string')) {
-                obj['my_string'] = 'String'.constructFromObject(data['my_string']);
+                obj['my_string'] = ApiClient.convertToType(data['my_string'], 'String');
             }
             if (data.hasOwnProperty('my_boolean')) {
-                obj['my_boolean'] = 'Boolean'.constructFromObject(data['my_boolean']);
+                obj['my_boolean'] = ApiClient.convertToType(data['my_boolean'], 'Boolean');
             }
         }
         return obj;
diff --git a/samples/client/petstore/javascript-promise-es6/src/model/StringBooleanMap.js b/samples/client/petstore/javascript-promise-es6/src/model/StringBooleanMap.js
new file mode 100644
index 000000000000..30172b33f7b9
--- /dev/null
+++ b/samples/client/petstore/javascript-promise-es6/src/model/StringBooleanMap.js
@@ -0,0 +1,67 @@
+/**
+ * OpenAPI Petstore
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * OpenAPI spec version: 1.0.0
+ * 
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ *
+ */
+
+import ApiClient from '../ApiClient';
+
+/**
+ * The StringBooleanMap model module.
+ * @module model/StringBooleanMap
+ * @version 1.0.0
+ */
+class StringBooleanMap {
+    /**
+     * Constructs a new StringBooleanMap.
+     * @alias module:model/StringBooleanMap
+     * @extends Object
+     */
+    constructor() { 
+        
+        StringBooleanMap.initialize(this);
+    }
+
+    /**
+     * Initializes the fields of this object.
+     * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
+     * Only for internal use.
+     */
+    static initialize(obj) { 
+    }
+
+    /**
+     * Constructs a StringBooleanMap from a plain JavaScript object, optionally creating a new instance.
+     * Copies all relevant properties from data to obj if supplied or a new instance if not.
+     * @param {Object} data The plain JavaScript object bearing properties of interest.
+     * @param {module:model/StringBooleanMap} obj Optional instance to populate.
+     * @return {module:model/StringBooleanMap} The populated StringBooleanMap instance.
+     */
+    static constructFromObject(data, obj) {
+        if (data) {
+            obj = obj || new StringBooleanMap();
+
+            ApiClient.constructFromObject(data, obj, 'Boolean');
+            
+
+        }
+        return obj;
+    }
+
+
+}
+
+
+
+
+
+
+export default StringBooleanMap;
+
diff --git a/samples/client/petstore/javascript-promise-es6/test/model/File.spec.js b/samples/client/petstore/javascript-promise-es6/test/model/File.spec.js
new file mode 100644
index 000000000000..10666dc53c7c
--- /dev/null
+++ b/samples/client/petstore/javascript-promise-es6/test/model/File.spec.js
@@ -0,0 +1,65 @@
+/**
+ * OpenAPI Petstore
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * OpenAPI spec version: 1.0.0
+ * 
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ *
+ */
+
+(function(root, factory) {
+  if (typeof define === 'function' && define.amd) {
+    // AMD.
+    define(['expect.js', '../../src/index'], factory);
+  } else if (typeof module === 'object' && module.exports) {
+    // CommonJS-like environments that support module.exports, like Node.
+    factory(require('expect.js'), require('../../src/index'));
+  } else {
+    // Browser globals (root is window)
+    factory(root.expect, root.OpenApiPetstore);
+  }
+}(this, function(expect, OpenApiPetstore) {
+  'use strict';
+
+  var instance;
+
+  beforeEach(function() {
+    instance = new OpenApiPetstore.File();
+  });
+
+  var getProperty = function(object, getter, property) {
+    // Use getter method if present; otherwise, get the property directly.
+    if (typeof object[getter] === 'function')
+      return object[getter]();
+    else
+      return object[property];
+  }
+
+  var setProperty = function(object, setter, property, value) {
+    // Use setter method if present; otherwise, set the property directly.
+    if (typeof object[setter] === 'function')
+      object[setter](value);
+    else
+      object[property] = value;
+  }
+
+  describe('File', function() {
+    it('should create an instance of File', function() {
+      // uncomment below and update the code to test File
+      //var instane = new OpenApiPetstore.File();
+      //expect(instance).to.be.a(OpenApiPetstore.File);
+    });
+
+    it('should have the property sourceURI (base name: "sourceURI")', function() {
+      // uncomment below and update the code to test the property sourceURI
+      //var instane = new OpenApiPetstore.File();
+      //expect(instance).to.be();
+    });
+
+  });
+
+}));
diff --git a/samples/client/petstore/javascript-promise-es6/test/model/FileSchemaTestClass.spec.js b/samples/client/petstore/javascript-promise-es6/test/model/FileSchemaTestClass.spec.js
new file mode 100644
index 000000000000..d6e49689d232
--- /dev/null
+++ b/samples/client/petstore/javascript-promise-es6/test/model/FileSchemaTestClass.spec.js
@@ -0,0 +1,71 @@
+/**
+ * OpenAPI Petstore
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * OpenAPI spec version: 1.0.0
+ * 
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ *
+ */
+
+(function(root, factory) {
+  if (typeof define === 'function' && define.amd) {
+    // AMD.
+    define(['expect.js', '../../src/index'], factory);
+  } else if (typeof module === 'object' && module.exports) {
+    // CommonJS-like environments that support module.exports, like Node.
+    factory(require('expect.js'), require('../../src/index'));
+  } else {
+    // Browser globals (root is window)
+    factory(root.expect, root.OpenApiPetstore);
+  }
+}(this, function(expect, OpenApiPetstore) {
+  'use strict';
+
+  var instance;
+
+  beforeEach(function() {
+    instance = new OpenApiPetstore.FileSchemaTestClass();
+  });
+
+  var getProperty = function(object, getter, property) {
+    // Use getter method if present; otherwise, get the property directly.
+    if (typeof object[getter] === 'function')
+      return object[getter]();
+    else
+      return object[property];
+  }
+
+  var setProperty = function(object, setter, property, value) {
+    // Use setter method if present; otherwise, set the property directly.
+    if (typeof object[setter] === 'function')
+      object[setter](value);
+    else
+      object[property] = value;
+  }
+
+  describe('FileSchemaTestClass', function() {
+    it('should create an instance of FileSchemaTestClass', function() {
+      // uncomment below and update the code to test FileSchemaTestClass
+      //var instane = new OpenApiPetstore.FileSchemaTestClass();
+      //expect(instance).to.be.a(OpenApiPetstore.FileSchemaTestClass);
+    });
+
+    it('should have the property file (base name: "file")', function() {
+      // uncomment below and update the code to test the property file
+      //var instane = new OpenApiPetstore.FileSchemaTestClass();
+      //expect(instance).to.be();
+    });
+
+    it('should have the property files (base name: "files")', function() {
+      // uncomment below and update the code to test the property files
+      //var instane = new OpenApiPetstore.FileSchemaTestClass();
+      //expect(instance).to.be();
+    });
+
+  });
+
+}));
diff --git a/samples/client/petstore/javascript-promise-es6/test/model/StringBooleanMap.spec.js b/samples/client/petstore/javascript-promise-es6/test/model/StringBooleanMap.spec.js
new file mode 100644
index 000000000000..0fd499cc819e
--- /dev/null
+++ b/samples/client/petstore/javascript-promise-es6/test/model/StringBooleanMap.spec.js
@@ -0,0 +1,59 @@
+/**
+ * OpenAPI Petstore
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * OpenAPI spec version: 1.0.0
+ * 
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ *
+ */
+
+(function(root, factory) {
+  if (typeof define === 'function' && define.amd) {
+    // AMD.
+    define(['expect.js', '../../src/index'], factory);
+  } else if (typeof module === 'object' && module.exports) {
+    // CommonJS-like environments that support module.exports, like Node.
+    factory(require('expect.js'), require('../../src/index'));
+  } else {
+    // Browser globals (root is window)
+    factory(root.expect, root.OpenApiPetstore);
+  }
+}(this, function(expect, OpenApiPetstore) {
+  'use strict';
+
+  var instance;
+
+  beforeEach(function() {
+    instance = new OpenApiPetstore.StringBooleanMap();
+  });
+
+  var getProperty = function(object, getter, property) {
+    // Use getter method if present; otherwise, get the property directly.
+    if (typeof object[getter] === 'function')
+      return object[getter]();
+    else
+      return object[property];
+  }
+
+  var setProperty = function(object, setter, property, value) {
+    // Use setter method if present; otherwise, set the property directly.
+    if (typeof object[setter] === 'function')
+      object[setter](value);
+    else
+      object[property] = value;
+  }
+
+  describe('StringBooleanMap', function() {
+    it('should create an instance of StringBooleanMap', function() {
+      // uncomment below and update the code to test StringBooleanMap
+      //var instane = new OpenApiPetstore.StringBooleanMap();
+      //expect(instance).to.be.a(OpenApiPetstore.StringBooleanMap);
+    });
+
+  });
+
+}));
diff --git a/samples/client/petstore/javascript-promise/.openapi-generator/VERSION b/samples/client/petstore/javascript-promise/.openapi-generator/VERSION
index 1c00c5181548..14900cee60e8 100644
--- a/samples/client/petstore/javascript-promise/.openapi-generator/VERSION
+++ b/samples/client/petstore/javascript-promise/.openapi-generator/VERSION
@@ -1 +1 @@
-3.0.2-SNAPSHOT
\ No newline at end of file
+3.2.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/javascript-promise/README.md b/samples/client/petstore/javascript-promise/README.md
index a78275aee673..93b5f02e2239 100644
--- a/samples/client/petstore/javascript-promise/README.md
+++ b/samples/client/petstore/javascript-promise/README.md
@@ -97,7 +97,7 @@ var OpenApiPetstore = require('open_api_petstore');
 
 var api = new OpenApiPetstore.AnotherFakeApi()
 var client = new OpenApiPetstore.Client(); // {Client} client model
-api.testSpecialTags(client).then(function(data) {
+api.call123testSpecialTags(client).then(function(data) {
   console.log('API called successfully. Returned data: ' + data);
 }, function(error) {
   console.error(error);
@@ -112,11 +112,12 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
 
 Class | Method | HTTP request | Description
 ------------ | ------------- | ------------- | -------------
-*OpenApiPetstore.AnotherFakeApi* | [**testSpecialTags**](docs/AnotherFakeApi.md#testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags
+*OpenApiPetstore.AnotherFakeApi* | [**call123testSpecialTags**](docs/AnotherFakeApi.md#call123testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags
 *OpenApiPetstore.FakeApi* | [**fakeOuterBooleanSerialize**](docs/FakeApi.md#fakeOuterBooleanSerialize) | **POST** /fake/outer/boolean | 
 *OpenApiPetstore.FakeApi* | [**fakeOuterCompositeSerialize**](docs/FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite | 
 *OpenApiPetstore.FakeApi* | [**fakeOuterNumberSerialize**](docs/FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number | 
 *OpenApiPetstore.FakeApi* | [**fakeOuterStringSerialize**](docs/FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string | 
+*OpenApiPetstore.FakeApi* | [**testBodyWithFileSchema**](docs/FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | 
 *OpenApiPetstore.FakeApi* | [**testBodyWithQueryParams**](docs/FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | 
 *OpenApiPetstore.FakeApi* | [**testClientModel**](docs/FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model
 *OpenApiPetstore.FakeApi* | [**testEndpointParameters**](docs/FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 
@@ -132,6 +133,7 @@ Class | Method | HTTP request | Description
 *OpenApiPetstore.PetApi* | [**updatePet**](docs/PetApi.md#updatePet) | **PUT** /pet | Update an existing pet
 *OpenApiPetstore.PetApi* | [**updatePetWithForm**](docs/PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data
 *OpenApiPetstore.PetApi* | [**uploadFile**](docs/PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image
+*OpenApiPetstore.PetApi* | [**uploadFileWithRequiredFile**](docs/PetApi.md#uploadFileWithRequiredFile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required)
 *OpenApiPetstore.StoreApi* | [**deleteOrder**](docs/StoreApi.md#deleteOrder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID
 *OpenApiPetstore.StoreApi* | [**getInventory**](docs/StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status
 *OpenApiPetstore.StoreApi* | [**getOrderById**](docs/StoreApi.md#getOrderById) | **GET** /store/order/{order_id} | Find purchase order by ID
@@ -164,6 +166,8 @@ Class | Method | HTTP request | Description
  - [OpenApiPetstore.EnumArrays](docs/EnumArrays.md)
  - [OpenApiPetstore.EnumClass](docs/EnumClass.md)
  - [OpenApiPetstore.EnumTest](docs/EnumTest.md)
+ - [OpenApiPetstore.File](docs/File.md)
+ - [OpenApiPetstore.FileSchemaTestClass](docs/FileSchemaTestClass.md)
  - [OpenApiPetstore.FormatTest](docs/FormatTest.md)
  - [OpenApiPetstore.HasOnlyReadOnly](docs/HasOnlyReadOnly.md)
  - [OpenApiPetstore.List](docs/List.md)
@@ -179,6 +183,7 @@ Class | Method | HTTP request | Description
  - [OpenApiPetstore.Pet](docs/Pet.md)
  - [OpenApiPetstore.ReadOnlyFirst](docs/ReadOnlyFirst.md)
  - [OpenApiPetstore.SpecialModelName](docs/SpecialModelName.md)
+ - [OpenApiPetstore.StringBooleanMap](docs/StringBooleanMap.md)
  - [OpenApiPetstore.Tag](docs/Tag.md)
  - [OpenApiPetstore.User](docs/User.md)
 
diff --git a/samples/client/petstore/javascript-promise/docs/AnotherFakeApi.md b/samples/client/petstore/javascript-promise/docs/AnotherFakeApi.md
index 6666cbc0df77..007f4327b179 100644
--- a/samples/client/petstore/javascript-promise/docs/AnotherFakeApi.md
+++ b/samples/client/petstore/javascript-promise/docs/AnotherFakeApi.md
@@ -4,16 +4,16 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
 
 Method | HTTP request | Description
 ------------- | ------------- | -------------
-[**testSpecialTags**](AnotherFakeApi.md#testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags
+[**call123testSpecialTags**](AnotherFakeApi.md#call123testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags
 
 
-
-# **testSpecialTags**
-> Client testSpecialTags(client)
+
+# **call123testSpecialTags**
+> Client call123testSpecialTags(client)
 
 To test special tags
 
-To test special tags
+To test special tags and operation ID starting with number
 
 ### Example
 ```javascript
@@ -21,7 +21,7 @@ var OpenApiPetstore = require('open_api_petstore');
 
 var apiInstance = new OpenApiPetstore.AnotherFakeApi();
 var client = new OpenApiPetstore.Client(); // Client | client model
-apiInstance.testSpecialTags(client).then(function(data) {
+apiInstance.call123testSpecialTags(client).then(function(data) {
   console.log('API called successfully. Returned data: ' + data);
 }, function(error) {
   console.error(error);
diff --git a/samples/client/petstore/javascript-promise/docs/FakeApi.md b/samples/client/petstore/javascript-promise/docs/FakeApi.md
index 9d56939ca608..cb50ee6de648 100644
--- a/samples/client/petstore/javascript-promise/docs/FakeApi.md
+++ b/samples/client/petstore/javascript-promise/docs/FakeApi.md
@@ -8,6 +8,7 @@ Method | HTTP request | Description
 [**fakeOuterCompositeSerialize**](FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite | 
 [**fakeOuterNumberSerialize**](FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number | 
 [**fakeOuterStringSerialize**](FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string | 
+[**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | 
 [**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | 
 [**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model
 [**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 
@@ -188,6 +189,47 @@ No authorization required
  - **Content-Type**: Not defined
  - **Accept**: */*
 
+
+# **testBodyWithFileSchema**
+> testBodyWithFileSchema(fileSchemaTestClass)
+
+
+
+For this test, the body for this request much reference a schema named `File`.
+
+### Example
+```javascript
+var OpenApiPetstore = require('open_api_petstore');
+
+var apiInstance = new OpenApiPetstore.FakeApi();
+var fileSchemaTestClass = new OpenApiPetstore.FileSchemaTestClass(); // FileSchemaTestClass | 
+apiInstance.testBodyWithFileSchema(fileSchemaTestClass).then(function() {
+  console.log('API called successfully.');
+}, function(error) {
+  console.error(error);
+});
+
+```
+
+### Parameters
+
+Name | Type | Description  | Notes
+------------- | ------------- | ------------- | -------------
+ **fileSchemaTestClass** | [**FileSchemaTestClass**](FileSchemaTestClass.md)|  | 
+
+### Return type
+
+null (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: Not defined
+
 
 # **testBodyWithQueryParams**
 > testBodyWithQueryParams(query, user)
diff --git a/samples/client/petstore/javascript-promise/docs/File.md b/samples/client/petstore/javascript-promise/docs/File.md
new file mode 100644
index 000000000000..a34d76a3e46e
--- /dev/null
+++ b/samples/client/petstore/javascript-promise/docs/File.md
@@ -0,0 +1,8 @@
+# OpenApiPetstore.File
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**sourceURI** | **String** | Test capitalization | [optional] 
+
+
diff --git a/samples/client/petstore/javascript-promise/docs/FileSchemaTestClass.md b/samples/client/petstore/javascript-promise/docs/FileSchemaTestClass.md
new file mode 100644
index 000000000000..3ccb4162dcc1
--- /dev/null
+++ b/samples/client/petstore/javascript-promise/docs/FileSchemaTestClass.md
@@ -0,0 +1,9 @@
+# OpenApiPetstore.FileSchemaTestClass
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**file** | **File** |  | [optional] 
+**files** | **[File]** |  | [optional] 
+
+
diff --git a/samples/client/petstore/javascript-promise/docs/MapTest.md b/samples/client/petstore/javascript-promise/docs/MapTest.md
index 4a128da00fd0..f1075bf0681f 100644
--- a/samples/client/petstore/javascript-promise/docs/MapTest.md
+++ b/samples/client/petstore/javascript-promise/docs/MapTest.md
@@ -5,6 +5,8 @@ Name | Type | Description | Notes
 ------------ | ------------- | ------------- | -------------
 **mapMapOfString** | **{String: {String: String}}** |  | [optional] 
 **mapOfEnumString** | **{String: String}** |  | [optional] 
+**directMap** | **{String: Boolean}** |  | [optional] 
+**indirectMap** | [**StringBooleanMap**](StringBooleanMap.md) |  | [optional] 
 
 
 
diff --git a/samples/client/petstore/javascript-promise/docs/PetApi.md b/samples/client/petstore/javascript-promise/docs/PetApi.md
index 28469bc95a1c..30f008958ffc 100644
--- a/samples/client/petstore/javascript-promise/docs/PetApi.md
+++ b/samples/client/petstore/javascript-promise/docs/PetApi.md
@@ -12,6 +12,7 @@ Method | HTTP request | Description
 [**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet
 [**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data
 [**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image
+[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required)
 
 
 
@@ -382,3 +383,52 @@ Name | Type | Description  | Notes
  - **Content-Type**: multipart/form-data
  - **Accept**: application/json
 
+
+# **uploadFileWithRequiredFile**
+> ApiResponse uploadFileWithRequiredFile(petId, requiredFile, opts)
+
+uploads an image (required)
+
+### Example
+```javascript
+var OpenApiPetstore = require('open_api_petstore');
+var defaultClient = OpenApiPetstore.ApiClient.instance;
+// Configure OAuth2 access token for authorization: petstore_auth
+var petstore_auth = defaultClient.authentications['petstore_auth'];
+petstore_auth.accessToken = 'YOUR ACCESS TOKEN';
+
+var apiInstance = new OpenApiPetstore.PetApi();
+var petId = 789; // Number | ID of pet to update
+var requiredFile = "/path/to/file"; // File | file to upload
+var opts = {
+  'additionalMetadata': "additionalMetadata_example" // String | Additional data to pass to server
+};
+apiInstance.uploadFileWithRequiredFile(petId, requiredFile, opts).then(function(data) {
+  console.log('API called successfully. Returned data: ' + data);
+}, function(error) {
+  console.error(error);
+});
+
+```
+
+### Parameters
+
+Name | Type | Description  | Notes
+------------- | ------------- | ------------- | -------------
+ **petId** | **Number**| ID of pet to update | 
+ **requiredFile** | **File**| file to upload | 
+ **additionalMetadata** | **String**| Additional data to pass to server | [optional] 
+
+### Return type
+
+[**ApiResponse**](ApiResponse.md)
+
+### Authorization
+
+[petstore_auth](../README.md#petstore_auth)
+
+### HTTP request headers
+
+ - **Content-Type**: multipart/form-data
+ - **Accept**: application/json
+
diff --git a/samples/client/petstore/javascript-promise/docs/StringBooleanMap.md b/samples/client/petstore/javascript-promise/docs/StringBooleanMap.md
new file mode 100644
index 000000000000..195a7d57677f
--- /dev/null
+++ b/samples/client/petstore/javascript-promise/docs/StringBooleanMap.md
@@ -0,0 +1,7 @@
+# OpenApiPetstore.StringBooleanMap
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+
+
diff --git a/samples/client/petstore/javascript-promise/package.json b/samples/client/petstore/javascript-promise/package.json
index 6cee1971957b..6fcefce10bad 100644
--- a/samples/client/petstore/javascript-promise/package.json
+++ b/samples/client/petstore/javascript-promise/package.json
@@ -11,7 +11,7 @@
     "fs": false
   },
   "dependencies": {
-    "superagent": "3.5.2"
+    "superagent": "3.7.0"
   },
   "devDependencies": {
     "mocha": "~2.3.4",
diff --git a/samples/client/petstore/javascript-promise/src/ApiClient.js b/samples/client/petstore/javascript-promise/src/ApiClient.js
index 435175dc8d6b..b2151bf9f420 100644
--- a/samples/client/petstore/javascript-promise/src/ApiClient.js
+++ b/samples/client/petstore/javascript-promise/src/ApiClient.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript-promise/src/api/AnotherFakeApi.js b/samples/client/petstore/javascript-promise/src/api/AnotherFakeApi.js
index 7821ec7a222e..84c0b45c7cd8 100644
--- a/samples/client/petstore/javascript-promise/src/api/AnotherFakeApi.js
+++ b/samples/client/petstore/javascript-promise/src/api/AnotherFakeApi.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
@@ -50,16 +50,16 @@
 
     /**
      * To test special tags
-     * To test special tags
+     * To test special tags and operation ID starting with number
      * @param {module:model/Client} client client model
      * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Client} and HTTP response
      */
-    this.testSpecialTagsWithHttpInfo = function(client) {
+    this.call123testSpecialTagsWithHttpInfo = function(client) {
       var postBody = client;
 
       // verify the required parameter 'client' is set
       if (client === undefined || client === null) {
-        throw new Error("Missing the required parameter 'client' when calling testSpecialTags");
+        throw new Error("Missing the required parameter 'client' when calling call123testSpecialTags");
       }
 
 
@@ -88,12 +88,12 @@
 
     /**
      * To test special tags
-     * To test special tags
+     * To test special tags and operation ID starting with number
      * @param {module:model/Client} client client model
      * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Client}
      */
-    this.testSpecialTags = function(client) {
-      return this.testSpecialTagsWithHttpInfo(client)
+    this.call123testSpecialTags = function(client) {
+      return this.call123testSpecialTagsWithHttpInfo(client)
         .then(function(response_and_data) {
           return response_and_data.data;
         });
diff --git a/samples/client/petstore/javascript-promise/src/api/FakeApi.js b/samples/client/petstore/javascript-promise/src/api/FakeApi.js
index 8b07f17c78f9..284f964a43c1 100644
--- a/samples/client/petstore/javascript-promise/src/api/FakeApi.js
+++ b/samples/client/petstore/javascript-promise/src/api/FakeApi.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
@@ -16,18 +16,18 @@
 (function(root, factory) {
   if (typeof define === 'function' && define.amd) {
     // AMD. Register as an anonymous module.
-    define(['ApiClient', 'model/Client', 'model/OuterComposite', 'model/User'], factory);
+    define(['ApiClient', 'model/Client', 'model/FileSchemaTestClass', 'model/OuterComposite', 'model/User'], factory);
   } else if (typeof module === 'object' && module.exports) {
     // CommonJS-like environments that support module.exports, like Node.
-    module.exports = factory(require('../ApiClient'), require('../model/Client'), require('../model/OuterComposite'), require('../model/User'));
+    module.exports = factory(require('../ApiClient'), require('../model/Client'), require('../model/FileSchemaTestClass'), require('../model/OuterComposite'), require('../model/User'));
   } else {
     // Browser globals (root is window)
     if (!root.OpenApiPetstore) {
       root.OpenApiPetstore = {};
     }
-    root.OpenApiPetstore.FakeApi = factory(root.OpenApiPetstore.ApiClient, root.OpenApiPetstore.Client, root.OpenApiPetstore.OuterComposite, root.OpenApiPetstore.User);
+    root.OpenApiPetstore.FakeApi = factory(root.OpenApiPetstore.ApiClient, root.OpenApiPetstore.Client, root.OpenApiPetstore.FileSchemaTestClass, root.OpenApiPetstore.OuterComposite, root.OpenApiPetstore.User);
   }
-}(this, function(ApiClient, Client, OuterComposite, User) {
+}(this, function(ApiClient, Client, FileSchemaTestClass, OuterComposite, User) {
   'use strict';
 
   /**
@@ -240,6 +240,56 @@
     }
 
 
+    /**
+     * For this test, the body for this request much reference a schema named `File`.
+     * @param {module:model/FileSchemaTestClass} fileSchemaTestClass 
+     * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
+     */
+    this.testBodyWithFileSchemaWithHttpInfo = function(fileSchemaTestClass) {
+      var postBody = fileSchemaTestClass;
+
+      // verify the required parameter 'fileSchemaTestClass' is set
+      if (fileSchemaTestClass === undefined || fileSchemaTestClass === null) {
+        throw new Error("Missing the required parameter 'fileSchemaTestClass' when calling testBodyWithFileSchema");
+      }
+
+
+      var pathParams = {
+      };
+      var queryParams = {
+      };
+      var collectionQueryParams = {
+      };
+      var headerParams = {
+      };
+      var formParams = {
+      };
+
+      var authNames = [];
+      var contentTypes = ['application/json'];
+      var accepts = [];
+      var returnType = null;
+
+      return this.apiClient.callApi(
+        '/fake/body-with-file-schema', 'PUT',
+        pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
+        authNames, contentTypes, accepts, returnType
+      );
+    }
+
+    /**
+     * For this test, the body for this request much reference a schema named `File`.
+     * @param {module:model/FileSchemaTestClass} fileSchemaTestClass 
+     * @return {Promise} a {@link https://www.promisejs.org/|Promise}
+     */
+    this.testBodyWithFileSchema = function(fileSchemaTestClass) {
+      return this.testBodyWithFileSchemaWithHttpInfo(fileSchemaTestClass)
+        .then(function(response_and_data) {
+          return response_and_data.data;
+        });
+    }
+
+
     /**
      * @param {String} query 
      * @param {module:model/User} user 
diff --git a/samples/client/petstore/javascript-promise/src/api/FakeClassnameTags123Api.js b/samples/client/petstore/javascript-promise/src/api/FakeClassnameTags123Api.js
index 7293a03fe8eb..409db18bdb9e 100644
--- a/samples/client/petstore/javascript-promise/src/api/FakeClassnameTags123Api.js
+++ b/samples/client/petstore/javascript-promise/src/api/FakeClassnameTags123Api.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript-promise/src/api/PetApi.js b/samples/client/petstore/javascript-promise/src/api/PetApi.js
index 68d7bd7e1022..15db5e00a60f 100644
--- a/samples/client/petstore/javascript-promise/src/api/PetApi.js
+++ b/samples/client/petstore/javascript-promise/src/api/PetApi.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
@@ -488,6 +488,71 @@
           return response_and_data.data;
         });
     }
+
+
+    /**
+     * uploads an image (required)
+     * @param {Number} petId ID of pet to update
+     * @param {File} requiredFile file to upload
+     * @param {Object} opts Optional parameters
+     * @param {String} opts.additionalMetadata Additional data to pass to server
+     * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ApiResponse} and HTTP response
+     */
+    this.uploadFileWithRequiredFileWithHttpInfo = function(petId, requiredFile, opts) {
+      opts = opts || {};
+      var postBody = null;
+
+      // verify the required parameter 'petId' is set
+      if (petId === undefined || petId === null) {
+        throw new Error("Missing the required parameter 'petId' when calling uploadFileWithRequiredFile");
+      }
+
+      // verify the required parameter 'requiredFile' is set
+      if (requiredFile === undefined || requiredFile === null) {
+        throw new Error("Missing the required parameter 'requiredFile' when calling uploadFileWithRequiredFile");
+      }
+
+
+      var pathParams = {
+        'petId': petId
+      };
+      var queryParams = {
+      };
+      var collectionQueryParams = {
+      };
+      var headerParams = {
+      };
+      var formParams = {
+        'additionalMetadata': opts['additionalMetadata'],
+        'requiredFile': requiredFile
+      };
+
+      var authNames = ['petstore_auth'];
+      var contentTypes = ['multipart/form-data'];
+      var accepts = ['application/json'];
+      var returnType = ApiResponse;
+
+      return this.apiClient.callApi(
+        '/fake/{petId}/uploadImageWithRequiredFile', 'POST',
+        pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
+        authNames, contentTypes, accepts, returnType
+      );
+    }
+
+    /**
+     * uploads an image (required)
+     * @param {Number} petId ID of pet to update
+     * @param {File} requiredFile file to upload
+     * @param {Object} opts Optional parameters
+     * @param {String} opts.additionalMetadata Additional data to pass to server
+     * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ApiResponse}
+     */
+    this.uploadFileWithRequiredFile = function(petId, requiredFile, opts) {
+      return this.uploadFileWithRequiredFileWithHttpInfo(petId, requiredFile, opts)
+        .then(function(response_and_data) {
+          return response_and_data.data;
+        });
+    }
   };
 
   return exports;
diff --git a/samples/client/petstore/javascript-promise/src/api/StoreApi.js b/samples/client/petstore/javascript-promise/src/api/StoreApi.js
index c4b2f93bbc0d..517f01e2c837 100644
--- a/samples/client/petstore/javascript-promise/src/api/StoreApi.js
+++ b/samples/client/petstore/javascript-promise/src/api/StoreApi.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript-promise/src/api/UserApi.js b/samples/client/petstore/javascript-promise/src/api/UserApi.js
index 4942cbc464b3..2dfa2d9429d8 100644
--- a/samples/client/petstore/javascript-promise/src/api/UserApi.js
+++ b/samples/client/petstore/javascript-promise/src/api/UserApi.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript-promise/src/index.js b/samples/client/petstore/javascript-promise/src/index.js
index 25685095fb2f..3f904b570cab 100644
--- a/samples/client/petstore/javascript-promise/src/index.js
+++ b/samples/client/petstore/javascript-promise/src/index.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
@@ -16,12 +16,12 @@
 (function(factory) {
   if (typeof define === 'function' && define.amd) {
     // AMD. Register as an anonymous module.
-    define(['ApiClient', 'model/AdditionalPropertiesClass', 'model/Animal', 'model/AnimalFarm', 'model/ApiResponse', 'model/ArrayOfArrayOfNumberOnly', 'model/ArrayOfNumberOnly', 'model/ArrayTest', 'model/Capitalization', 'model/Cat', 'model/Category', 'model/ClassModel', 'model/Client', 'model/Dog', 'model/EnumArrays', 'model/EnumClass', 'model/EnumTest', 'model/FormatTest', 'model/HasOnlyReadOnly', 'model/List', 'model/MapTest', 'model/MixedPropertiesAndAdditionalPropertiesClass', 'model/Model200Response', 'model/ModelReturn', 'model/Name', 'model/NumberOnly', 'model/Order', 'model/OuterComposite', 'model/OuterEnum', 'model/Pet', 'model/ReadOnlyFirst', 'model/SpecialModelName', 'model/Tag', 'model/User', 'api/AnotherFakeApi', 'api/FakeApi', 'api/FakeClassnameTags123Api', 'api/PetApi', 'api/StoreApi', 'api/UserApi'], factory);
+    define(['ApiClient', 'model/AdditionalPropertiesClass', 'model/Animal', 'model/AnimalFarm', 'model/ApiResponse', 'model/ArrayOfArrayOfNumberOnly', 'model/ArrayOfNumberOnly', 'model/ArrayTest', 'model/Capitalization', 'model/Cat', 'model/Category', 'model/ClassModel', 'model/Client', 'model/Dog', 'model/EnumArrays', 'model/EnumClass', 'model/EnumTest', 'model/File', 'model/FileSchemaTestClass', 'model/FormatTest', 'model/HasOnlyReadOnly', 'model/List', 'model/MapTest', 'model/MixedPropertiesAndAdditionalPropertiesClass', 'model/Model200Response', 'model/ModelReturn', 'model/Name', 'model/NumberOnly', 'model/Order', 'model/OuterComposite', 'model/OuterEnum', 'model/Pet', 'model/ReadOnlyFirst', 'model/SpecialModelName', 'model/StringBooleanMap', 'model/Tag', 'model/User', 'api/AnotherFakeApi', 'api/FakeApi', 'api/FakeClassnameTags123Api', 'api/PetApi', 'api/StoreApi', 'api/UserApi'], factory);
   } else if (typeof module === 'object' && module.exports) {
     // CommonJS-like environments that support module.exports, like Node.
-    module.exports = factory(require('./ApiClient'), require('./model/AdditionalPropertiesClass'), require('./model/Animal'), require('./model/AnimalFarm'), require('./model/ApiResponse'), require('./model/ArrayOfArrayOfNumberOnly'), require('./model/ArrayOfNumberOnly'), require('./model/ArrayTest'), require('./model/Capitalization'), require('./model/Cat'), require('./model/Category'), require('./model/ClassModel'), require('./model/Client'), require('./model/Dog'), require('./model/EnumArrays'), require('./model/EnumClass'), require('./model/EnumTest'), require('./model/FormatTest'), require('./model/HasOnlyReadOnly'), require('./model/List'), require('./model/MapTest'), require('./model/MixedPropertiesAndAdditionalPropertiesClass'), require('./model/Model200Response'), require('./model/ModelReturn'), require('./model/Name'), require('./model/NumberOnly'), require('./model/Order'), require('./model/OuterComposite'), require('./model/OuterEnum'), require('./model/Pet'), require('./model/ReadOnlyFirst'), require('./model/SpecialModelName'), require('./model/Tag'), require('./model/User'), require('./api/AnotherFakeApi'), require('./api/FakeApi'), require('./api/FakeClassnameTags123Api'), require('./api/PetApi'), require('./api/StoreApi'), require('./api/UserApi'));
+    module.exports = factory(require('./ApiClient'), require('./model/AdditionalPropertiesClass'), require('./model/Animal'), require('./model/AnimalFarm'), require('./model/ApiResponse'), require('./model/ArrayOfArrayOfNumberOnly'), require('./model/ArrayOfNumberOnly'), require('./model/ArrayTest'), require('./model/Capitalization'), require('./model/Cat'), require('./model/Category'), require('./model/ClassModel'), require('./model/Client'), require('./model/Dog'), require('./model/EnumArrays'), require('./model/EnumClass'), require('./model/EnumTest'), require('./model/File'), require('./model/FileSchemaTestClass'), require('./model/FormatTest'), require('./model/HasOnlyReadOnly'), require('./model/List'), require('./model/MapTest'), require('./model/MixedPropertiesAndAdditionalPropertiesClass'), require('./model/Model200Response'), require('./model/ModelReturn'), require('./model/Name'), require('./model/NumberOnly'), require('./model/Order'), require('./model/OuterComposite'), require('./model/OuterEnum'), require('./model/Pet'), require('./model/ReadOnlyFirst'), require('./model/SpecialModelName'), require('./model/StringBooleanMap'), require('./model/Tag'), require('./model/User'), require('./api/AnotherFakeApi'), require('./api/FakeApi'), require('./api/FakeClassnameTags123Api'), require('./api/PetApi'), require('./api/StoreApi'), require('./api/UserApi'));
   }
-}(function(ApiClient, AdditionalPropertiesClass, Animal, AnimalFarm, ApiResponse, ArrayOfArrayOfNumberOnly, ArrayOfNumberOnly, ArrayTest, Capitalization, Cat, Category, ClassModel, Client, Dog, EnumArrays, EnumClass, EnumTest, FormatTest, HasOnlyReadOnly, List, MapTest, MixedPropertiesAndAdditionalPropertiesClass, Model200Response, ModelReturn, Name, NumberOnly, Order, OuterComposite, OuterEnum, Pet, ReadOnlyFirst, SpecialModelName, Tag, User, AnotherFakeApi, FakeApi, FakeClassnameTags123Api, PetApi, StoreApi, UserApi) {
+}(function(ApiClient, AdditionalPropertiesClass, Animal, AnimalFarm, ApiResponse, ArrayOfArrayOfNumberOnly, ArrayOfNumberOnly, ArrayTest, Capitalization, Cat, Category, ClassModel, Client, Dog, EnumArrays, EnumClass, EnumTest, File, FileSchemaTestClass, FormatTest, HasOnlyReadOnly, List, MapTest, MixedPropertiesAndAdditionalPropertiesClass, Model200Response, ModelReturn, Name, NumberOnly, Order, OuterComposite, OuterEnum, Pet, ReadOnlyFirst, SpecialModelName, StringBooleanMap, Tag, User, AnotherFakeApi, FakeApi, FakeClassnameTags123Api, PetApi, StoreApi, UserApi) {
   'use strict';
 
   /**
@@ -141,6 +141,16 @@
      * @property {module:model/EnumTest}
      */
     EnumTest: EnumTest,
+    /**
+     * The File model constructor.
+     * @property {module:model/File}
+     */
+    File: File,
+    /**
+     * The FileSchemaTestClass model constructor.
+     * @property {module:model/FileSchemaTestClass}
+     */
+    FileSchemaTestClass: FileSchemaTestClass,
     /**
      * The FormatTest model constructor.
      * @property {module:model/FormatTest}
@@ -216,6 +226,11 @@
      * @property {module:model/SpecialModelName}
      */
     SpecialModelName: SpecialModelName,
+    /**
+     * The StringBooleanMap model constructor.
+     * @property {module:model/StringBooleanMap}
+     */
+    StringBooleanMap: StringBooleanMap,
     /**
      * The Tag model constructor.
      * @property {module:model/Tag}
diff --git a/samples/client/petstore/javascript-promise/src/model/AdditionalPropertiesClass.js b/samples/client/petstore/javascript-promise/src/model/AdditionalPropertiesClass.js
index 08572d900840..3e41a2906a5b 100644
--- a/samples/client/petstore/javascript-promise/src/model/AdditionalPropertiesClass.js
+++ b/samples/client/petstore/javascript-promise/src/model/AdditionalPropertiesClass.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript-promise/src/model/Animal.js b/samples/client/petstore/javascript-promise/src/model/Animal.js
index 29376d771bfc..5ec0fe427cb4 100644
--- a/samples/client/petstore/javascript-promise/src/model/Animal.js
+++ b/samples/client/petstore/javascript-promise/src/model/Animal.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript-promise/src/model/AnimalFarm.js b/samples/client/petstore/javascript-promise/src/model/AnimalFarm.js
index e1a4797eec19..f80991972452 100644
--- a/samples/client/petstore/javascript-promise/src/model/AnimalFarm.js
+++ b/samples/client/petstore/javascript-promise/src/model/AnimalFarm.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript-promise/src/model/ApiResponse.js b/samples/client/petstore/javascript-promise/src/model/ApiResponse.js
index 5c112418181d..d3236a99234a 100644
--- a/samples/client/petstore/javascript-promise/src/model/ApiResponse.js
+++ b/samples/client/petstore/javascript-promise/src/model/ApiResponse.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript-promise/src/model/ArrayOfArrayOfNumberOnly.js b/samples/client/petstore/javascript-promise/src/model/ArrayOfArrayOfNumberOnly.js
index 024c26469df3..e7ac7b24a330 100644
--- a/samples/client/petstore/javascript-promise/src/model/ArrayOfArrayOfNumberOnly.js
+++ b/samples/client/petstore/javascript-promise/src/model/ArrayOfArrayOfNumberOnly.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript-promise/src/model/ArrayOfNumberOnly.js b/samples/client/petstore/javascript-promise/src/model/ArrayOfNumberOnly.js
index ca79a7c2a6d0..7c98321c3d4b 100644
--- a/samples/client/petstore/javascript-promise/src/model/ArrayOfNumberOnly.js
+++ b/samples/client/petstore/javascript-promise/src/model/ArrayOfNumberOnly.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript-promise/src/model/ArrayTest.js b/samples/client/petstore/javascript-promise/src/model/ArrayTest.js
index 01b97a1b5809..0f47e3e78ef1 100644
--- a/samples/client/petstore/javascript-promise/src/model/ArrayTest.js
+++ b/samples/client/petstore/javascript-promise/src/model/ArrayTest.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript-promise/src/model/Capitalization.js b/samples/client/petstore/javascript-promise/src/model/Capitalization.js
index 05934fb253ce..9f5e832699d3 100644
--- a/samples/client/petstore/javascript-promise/src/model/Capitalization.js
+++ b/samples/client/petstore/javascript-promise/src/model/Capitalization.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript-promise/src/model/Cat.js b/samples/client/petstore/javascript-promise/src/model/Cat.js
index 10b787fed4eb..4c1d8f0c845d 100644
--- a/samples/client/petstore/javascript-promise/src/model/Cat.js
+++ b/samples/client/petstore/javascript-promise/src/model/Cat.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript-promise/src/model/Category.js b/samples/client/petstore/javascript-promise/src/model/Category.js
index c289c6b8e5bd..560f1a94013e 100644
--- a/samples/client/petstore/javascript-promise/src/model/Category.js
+++ b/samples/client/petstore/javascript-promise/src/model/Category.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript-promise/src/model/ClassModel.js b/samples/client/petstore/javascript-promise/src/model/ClassModel.js
index 6edd8fbadd04..cadf752c6446 100644
--- a/samples/client/petstore/javascript-promise/src/model/ClassModel.js
+++ b/samples/client/petstore/javascript-promise/src/model/ClassModel.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript-promise/src/model/Client.js b/samples/client/petstore/javascript-promise/src/model/Client.js
index e563bcf7ea59..7bf09ed3ac6f 100644
--- a/samples/client/petstore/javascript-promise/src/model/Client.js
+++ b/samples/client/petstore/javascript-promise/src/model/Client.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript-promise/src/model/Dog.js b/samples/client/petstore/javascript-promise/src/model/Dog.js
index c308f3dc9f11..93f8f38ae13d 100644
--- a/samples/client/petstore/javascript-promise/src/model/Dog.js
+++ b/samples/client/petstore/javascript-promise/src/model/Dog.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript-promise/src/model/EnumArrays.js b/samples/client/petstore/javascript-promise/src/model/EnumArrays.js
index 07d52b119db0..d7b36eb6307e 100644
--- a/samples/client/petstore/javascript-promise/src/model/EnumArrays.js
+++ b/samples/client/petstore/javascript-promise/src/model/EnumArrays.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript-promise/src/model/EnumClass.js b/samples/client/petstore/javascript-promise/src/model/EnumClass.js
index d4a9f39f5661..d2f7c69374b1 100644
--- a/samples/client/petstore/javascript-promise/src/model/EnumClass.js
+++ b/samples/client/petstore/javascript-promise/src/model/EnumClass.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript-promise/src/model/EnumTest.js b/samples/client/petstore/javascript-promise/src/model/EnumTest.js
index 4dfc6753323a..e6f1a7ea9e47 100644
--- a/samples/client/petstore/javascript-promise/src/model/EnumTest.js
+++ b/samples/client/petstore/javascript-promise/src/model/EnumTest.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript-promise/src/model/File.js b/samples/client/petstore/javascript-promise/src/model/File.js
new file mode 100644
index 000000000000..aa7449e29078
--- /dev/null
+++ b/samples/client/petstore/javascript-promise/src/model/File.js
@@ -0,0 +1,83 @@
+/**
+ * OpenAPI Petstore
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * OpenAPI spec version: 1.0.0
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ *
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
+ *
+ * Do not edit the class manually.
+ *
+ */
+
+(function(root, factory) {
+  if (typeof define === 'function' && define.amd) {
+    // AMD. Register as an anonymous module.
+    define(['ApiClient'], factory);
+  } else if (typeof module === 'object' && module.exports) {
+    // CommonJS-like environments that support module.exports, like Node.
+    module.exports = factory(require('../ApiClient'));
+  } else {
+    // Browser globals (root is window)
+    if (!root.OpenApiPetstore) {
+      root.OpenApiPetstore = {};
+    }
+    root.OpenApiPetstore.File = factory(root.OpenApiPetstore.ApiClient);
+  }
+}(this, function(ApiClient) {
+  'use strict';
+
+
+
+
+  /**
+   * The File model module.
+   * @module model/File
+   * @version 1.0.0
+   */
+
+  /**
+   * Constructs a new File.
+   * Must be named `File` for test.
+   * @alias module:model/File
+   * @class
+   */
+  var exports = function() {
+    var _this = this;
+
+
+  };
+
+  /**
+   * Constructs a File from a plain JavaScript object, optionally creating a new instance.
+   * Copies all relevant properties from data to obj if supplied or a new instance if not.
+   * @param {Object} data The plain JavaScript object bearing properties of interest.
+   * @param {module:model/File} obj Optional instance to populate.
+   * @return {module:model/File} The populated File instance.
+   */
+  exports.constructFromObject = function(data, obj) {
+    if (data) {
+      obj = obj || new exports();
+
+      if (data.hasOwnProperty('sourceURI')) {
+        obj['sourceURI'] = ApiClient.convertToType(data['sourceURI'], 'String');
+      }
+    }
+    return obj;
+  }
+
+  /**
+   * Test capitalization
+   * @member {String} sourceURI
+   */
+  exports.prototype['sourceURI'] = undefined;
+
+
+
+  return exports;
+}));
+
+
diff --git a/samples/client/petstore/javascript-promise/src/model/FileSchemaTestClass.js b/samples/client/petstore/javascript-promise/src/model/FileSchemaTestClass.js
new file mode 100644
index 000000000000..f2f1b8e966a3
--- /dev/null
+++ b/samples/client/petstore/javascript-promise/src/model/FileSchemaTestClass.js
@@ -0,0 +1,89 @@
+/**
+ * OpenAPI Petstore
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * OpenAPI spec version: 1.0.0
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ *
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
+ *
+ * Do not edit the class manually.
+ *
+ */
+
+(function(root, factory) {
+  if (typeof define === 'function' && define.amd) {
+    // AMD. Register as an anonymous module.
+    define(['ApiClient'], factory);
+  } else if (typeof module === 'object' && module.exports) {
+    // CommonJS-like environments that support module.exports, like Node.
+    module.exports = factory(require('../ApiClient'));
+  } else {
+    // Browser globals (root is window)
+    if (!root.OpenApiPetstore) {
+      root.OpenApiPetstore = {};
+    }
+    root.OpenApiPetstore.FileSchemaTestClass = factory(root.OpenApiPetstore.ApiClient);
+  }
+}(this, function(ApiClient) {
+  'use strict';
+
+
+
+
+  /**
+   * The FileSchemaTestClass model module.
+   * @module model/FileSchemaTestClass
+   * @version 1.0.0
+   */
+
+  /**
+   * Constructs a new FileSchemaTestClass.
+   * @alias module:model/FileSchemaTestClass
+   * @class
+   */
+  var exports = function() {
+    var _this = this;
+
+
+
+  };
+
+  /**
+   * Constructs a FileSchemaTestClass from a plain JavaScript object, optionally creating a new instance.
+   * Copies all relevant properties from data to obj if supplied or a new instance if not.
+   * @param {Object} data The plain JavaScript object bearing properties of interest.
+   * @param {module:model/FileSchemaTestClass} obj Optional instance to populate.
+   * @return {module:model/FileSchemaTestClass} The populated FileSchemaTestClass instance.
+   */
+  exports.constructFromObject = function(data, obj) {
+    if (data) {
+      obj = obj || new exports();
+
+      if (data.hasOwnProperty('file')) {
+        obj['file'] = File.constructFromObject(data['file']);
+      }
+      if (data.hasOwnProperty('files')) {
+        obj['files'] = ApiClient.convertToType(data['files'], [File]);
+      }
+    }
+    return obj;
+  }
+
+  /**
+   * @member {File} file
+   */
+  exports.prototype['file'] = undefined;
+  /**
+   * @member {Array.} files
+   */
+  exports.prototype['files'] = undefined;
+
+
+
+  return exports;
+}));
+
+
diff --git a/samples/client/petstore/javascript-promise/src/model/FormatTest.js b/samples/client/petstore/javascript-promise/src/model/FormatTest.js
index 6c5986d48985..ea6d19666136 100644
--- a/samples/client/petstore/javascript-promise/src/model/FormatTest.js
+++ b/samples/client/petstore/javascript-promise/src/model/FormatTest.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript-promise/src/model/HasOnlyReadOnly.js b/samples/client/petstore/javascript-promise/src/model/HasOnlyReadOnly.js
index 484fd0c99910..b6470082caf9 100644
--- a/samples/client/petstore/javascript-promise/src/model/HasOnlyReadOnly.js
+++ b/samples/client/petstore/javascript-promise/src/model/HasOnlyReadOnly.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript-promise/src/model/List.js b/samples/client/petstore/javascript-promise/src/model/List.js
index ab3c2e34e343..3b9f343524e8 100644
--- a/samples/client/petstore/javascript-promise/src/model/List.js
+++ b/samples/client/petstore/javascript-promise/src/model/List.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript-promise/src/model/MapTest.js b/samples/client/petstore/javascript-promise/src/model/MapTest.js
index adf82a358c28..8563624adffe 100644
--- a/samples/client/petstore/javascript-promise/src/model/MapTest.js
+++ b/samples/client/petstore/javascript-promise/src/model/MapTest.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
@@ -16,18 +16,18 @@
 (function(root, factory) {
   if (typeof define === 'function' && define.amd) {
     // AMD. Register as an anonymous module.
-    define(['ApiClient'], factory);
+    define(['ApiClient', 'model/StringBooleanMap'], factory);
   } else if (typeof module === 'object' && module.exports) {
     // CommonJS-like environments that support module.exports, like Node.
-    module.exports = factory(require('../ApiClient'));
+    module.exports = factory(require('../ApiClient'), require('./StringBooleanMap'));
   } else {
     // Browser globals (root is window)
     if (!root.OpenApiPetstore) {
       root.OpenApiPetstore = {};
     }
-    root.OpenApiPetstore.MapTest = factory(root.OpenApiPetstore.ApiClient);
+    root.OpenApiPetstore.MapTest = factory(root.OpenApiPetstore.ApiClient, root.OpenApiPetstore.StringBooleanMap);
   }
-}(this, function(ApiClient) {
+}(this, function(ApiClient, StringBooleanMap) {
   'use strict';
 
 
@@ -49,6 +49,8 @@
 
 
 
+
+
   };
 
   /**
@@ -68,6 +70,12 @@
       if (data.hasOwnProperty('map_of_enum_string')) {
         obj['map_of_enum_string'] = ApiClient.convertToType(data['map_of_enum_string'], {'String': 'String'});
       }
+      if (data.hasOwnProperty('direct_map')) {
+        obj['direct_map'] = ApiClient.convertToType(data['direct_map'], {'String': 'Boolean'});
+      }
+      if (data.hasOwnProperty('indirect_map')) {
+        obj['indirect_map'] = StringBooleanMap.constructFromObject(data['indirect_map']);
+      }
     }
     return obj;
   }
@@ -80,6 +88,14 @@
    * @member {Object.} map_of_enum_string
    */
   exports.prototype['map_of_enum_string'] = undefined;
+  /**
+   * @member {Object.} direct_map
+   */
+  exports.prototype['direct_map'] = undefined;
+  /**
+   * @member {module:model/StringBooleanMap} indirect_map
+   */
+  exports.prototype['indirect_map'] = undefined;
 
 
   /**
diff --git a/samples/client/petstore/javascript-promise/src/model/MixedPropertiesAndAdditionalPropertiesClass.js b/samples/client/petstore/javascript-promise/src/model/MixedPropertiesAndAdditionalPropertiesClass.js
index 62c7a2f59e32..ff56b0e4981c 100644
--- a/samples/client/petstore/javascript-promise/src/model/MixedPropertiesAndAdditionalPropertiesClass.js
+++ b/samples/client/petstore/javascript-promise/src/model/MixedPropertiesAndAdditionalPropertiesClass.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript-promise/src/model/Model200Response.js b/samples/client/petstore/javascript-promise/src/model/Model200Response.js
index 84131169fb13..665e9d64f653 100644
--- a/samples/client/petstore/javascript-promise/src/model/Model200Response.js
+++ b/samples/client/petstore/javascript-promise/src/model/Model200Response.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript-promise/src/model/ModelReturn.js b/samples/client/petstore/javascript-promise/src/model/ModelReturn.js
index 87484d2ee234..836fab1b221c 100644
--- a/samples/client/petstore/javascript-promise/src/model/ModelReturn.js
+++ b/samples/client/petstore/javascript-promise/src/model/ModelReturn.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript-promise/src/model/Name.js b/samples/client/petstore/javascript-promise/src/model/Name.js
index 8c851c4cec54..24d63b4836f8 100644
--- a/samples/client/petstore/javascript-promise/src/model/Name.js
+++ b/samples/client/petstore/javascript-promise/src/model/Name.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript-promise/src/model/NumberOnly.js b/samples/client/petstore/javascript-promise/src/model/NumberOnly.js
index 389ad08e8c5c..b50c8dadc269 100644
--- a/samples/client/petstore/javascript-promise/src/model/NumberOnly.js
+++ b/samples/client/petstore/javascript-promise/src/model/NumberOnly.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript-promise/src/model/Order.js b/samples/client/petstore/javascript-promise/src/model/Order.js
index bfd5f3714bef..5abd1899c042 100644
--- a/samples/client/petstore/javascript-promise/src/model/Order.js
+++ b/samples/client/petstore/javascript-promise/src/model/Order.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript-promise/src/model/OuterComposite.js b/samples/client/petstore/javascript-promise/src/model/OuterComposite.js
index b4fc48476dee..7410237332e4 100644
--- a/samples/client/petstore/javascript-promise/src/model/OuterComposite.js
+++ b/samples/client/petstore/javascript-promise/src/model/OuterComposite.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
@@ -64,13 +64,13 @@
       obj = obj || new exports();
 
       if (data.hasOwnProperty('my_number')) {
-        obj['my_number'] = 'Number'.constructFromObject(data['my_number']);
+        obj['my_number'] = ApiClient.convertToType(data['my_number'], 'Number');
       }
       if (data.hasOwnProperty('my_string')) {
-        obj['my_string'] = 'String'.constructFromObject(data['my_string']);
+        obj['my_string'] = ApiClient.convertToType(data['my_string'], 'String');
       }
       if (data.hasOwnProperty('my_boolean')) {
-        obj['my_boolean'] = 'Boolean'.constructFromObject(data['my_boolean']);
+        obj['my_boolean'] = ApiClient.convertToType(data['my_boolean'], 'Boolean');
       }
     }
     return obj;
diff --git a/samples/client/petstore/javascript-promise/src/model/OuterEnum.js b/samples/client/petstore/javascript-promise/src/model/OuterEnum.js
index 9e1f532b44d0..0d7f9a4fd595 100644
--- a/samples/client/petstore/javascript-promise/src/model/OuterEnum.js
+++ b/samples/client/petstore/javascript-promise/src/model/OuterEnum.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript-promise/src/model/Pet.js b/samples/client/petstore/javascript-promise/src/model/Pet.js
index 55997490b789..69d47d25aef9 100644
--- a/samples/client/petstore/javascript-promise/src/model/Pet.js
+++ b/samples/client/petstore/javascript-promise/src/model/Pet.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript-promise/src/model/ReadOnlyFirst.js b/samples/client/petstore/javascript-promise/src/model/ReadOnlyFirst.js
index 1b0ae1104cc6..4e2f573958ea 100644
--- a/samples/client/petstore/javascript-promise/src/model/ReadOnlyFirst.js
+++ b/samples/client/petstore/javascript-promise/src/model/ReadOnlyFirst.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript-promise/src/model/SpecialModelName.js b/samples/client/petstore/javascript-promise/src/model/SpecialModelName.js
index 22464bbe7a25..5bea0b84fcf7 100644
--- a/samples/client/petstore/javascript-promise/src/model/SpecialModelName.js
+++ b/samples/client/petstore/javascript-promise/src/model/SpecialModelName.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript-promise/src/model/StringBooleanMap.js b/samples/client/petstore/javascript-promise/src/model/StringBooleanMap.js
new file mode 100644
index 000000000000..d07c0fc99ea7
--- /dev/null
+++ b/samples/client/petstore/javascript-promise/src/model/StringBooleanMap.js
@@ -0,0 +1,76 @@
+/**
+ * OpenAPI Petstore
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * OpenAPI spec version: 1.0.0
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ *
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
+ *
+ * Do not edit the class manually.
+ *
+ */
+
+(function(root, factory) {
+  if (typeof define === 'function' && define.amd) {
+    // AMD. Register as an anonymous module.
+    define(['ApiClient'], factory);
+  } else if (typeof module === 'object' && module.exports) {
+    // CommonJS-like environments that support module.exports, like Node.
+    module.exports = factory(require('../ApiClient'));
+  } else {
+    // Browser globals (root is window)
+    if (!root.OpenApiPetstore) {
+      root.OpenApiPetstore = {};
+    }
+    root.OpenApiPetstore.StringBooleanMap = factory(root.OpenApiPetstore.ApiClient);
+  }
+}(this, function(ApiClient) {
+  'use strict';
+
+
+
+
+  /**
+   * The StringBooleanMap model module.
+   * @module model/StringBooleanMap
+   * @version 1.0.0
+   */
+
+  /**
+   * Constructs a new StringBooleanMap.
+   * @alias module:model/StringBooleanMap
+   * @class
+   * @extends Object
+   */
+  var exports = function() {
+    var _this = this;
+
+    return _this;
+  };
+
+  /**
+   * Constructs a StringBooleanMap from a plain JavaScript object, optionally creating a new instance.
+   * Copies all relevant properties from data to obj if supplied or a new instance if not.
+   * @param {Object} data The plain JavaScript object bearing properties of interest.
+   * @param {module:model/StringBooleanMap} obj Optional instance to populate.
+   * @return {module:model/StringBooleanMap} The populated StringBooleanMap instance.
+   */
+  exports.constructFromObject = function(data, obj) {
+    if (data) {
+      obj = obj || new exports();
+      ApiClient.constructFromObject(data, obj, 'Boolean');
+
+    }
+    return obj;
+  }
+
+
+
+
+  return exports;
+}));
+
+
diff --git a/samples/client/petstore/javascript-promise/src/model/Tag.js b/samples/client/petstore/javascript-promise/src/model/Tag.js
index 9e4f88b0872e..09299a4d0d61 100644
--- a/samples/client/petstore/javascript-promise/src/model/Tag.js
+++ b/samples/client/petstore/javascript-promise/src/model/Tag.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript-promise/src/model/User.js b/samples/client/petstore/javascript-promise/src/model/User.js
index 06d4e6e7ad0a..62a2a70c6802 100644
--- a/samples/client/petstore/javascript-promise/src/model/User.js
+++ b/samples/client/petstore/javascript-promise/src/model/User.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript-promise/test/model/File.spec.js b/samples/client/petstore/javascript-promise/test/model/File.spec.js
new file mode 100644
index 000000000000..67f2956c3973
--- /dev/null
+++ b/samples/client/petstore/javascript-promise/test/model/File.spec.js
@@ -0,0 +1,67 @@
+/**
+ * OpenAPI Petstore
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * OpenAPI spec version: 1.0.0
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ *
+ * OpenAPI Generator version: 3.2.0-SNAPSHOT
+ *
+ * Do not edit the class manually.
+ *
+ */
+
+(function(root, factory) {
+  if (typeof define === 'function' && define.amd) {
+    // AMD.
+    define(['expect.js', '../../src/index'], factory);
+  } else if (typeof module === 'object' && module.exports) {
+    // CommonJS-like environments that support module.exports, like Node.
+    factory(require('expect.js'), require('../../src/index'));
+  } else {
+    // Browser globals (root is window)
+    factory(root.expect, root.OpenApiPetstore);
+  }
+}(this, function(expect, OpenApiPetstore) {
+  'use strict';
+
+  var instance;
+
+  beforeEach(function() {
+    instance = new OpenApiPetstore.File();
+  });
+
+  var getProperty = function(object, getter, property) {
+    // Use getter method if present; otherwise, get the property directly.
+    if (typeof object[getter] === 'function')
+      return object[getter]();
+    else
+      return object[property];
+  }
+
+  var setProperty = function(object, setter, property, value) {
+    // Use setter method if present; otherwise, set the property directly.
+    if (typeof object[setter] === 'function')
+      object[setter](value);
+    else
+      object[property] = value;
+  }
+
+  describe('File', function() {
+    it('should create an instance of File', function() {
+      // uncomment below and update the code to test File
+      //var instance = new OpenApiPetstore.File();
+      //expect(instance).to.be.a(OpenApiPetstore.File);
+    });
+
+    it('should have the property sourceURI (base name: "sourceURI")', function() {
+      // uncomment below and update the code to test the property sourceURI
+      //var instance = new OpenApiPetstore.File();
+      //expect(instance).to.be();
+    });
+
+  });
+
+}));
diff --git a/samples/client/petstore/javascript-promise/test/model/FileSchemaTestClass.spec.js b/samples/client/petstore/javascript-promise/test/model/FileSchemaTestClass.spec.js
new file mode 100644
index 000000000000..74f68c03ff6b
--- /dev/null
+++ b/samples/client/petstore/javascript-promise/test/model/FileSchemaTestClass.spec.js
@@ -0,0 +1,73 @@
+/**
+ * OpenAPI Petstore
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * OpenAPI spec version: 1.0.0
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ *
+ * OpenAPI Generator version: 3.2.0-SNAPSHOT
+ *
+ * Do not edit the class manually.
+ *
+ */
+
+(function(root, factory) {
+  if (typeof define === 'function' && define.amd) {
+    // AMD.
+    define(['expect.js', '../../src/index'], factory);
+  } else if (typeof module === 'object' && module.exports) {
+    // CommonJS-like environments that support module.exports, like Node.
+    factory(require('expect.js'), require('../../src/index'));
+  } else {
+    // Browser globals (root is window)
+    factory(root.expect, root.OpenApiPetstore);
+  }
+}(this, function(expect, OpenApiPetstore) {
+  'use strict';
+
+  var instance;
+
+  beforeEach(function() {
+    instance = new OpenApiPetstore.FileSchemaTestClass();
+  });
+
+  var getProperty = function(object, getter, property) {
+    // Use getter method if present; otherwise, get the property directly.
+    if (typeof object[getter] === 'function')
+      return object[getter]();
+    else
+      return object[property];
+  }
+
+  var setProperty = function(object, setter, property, value) {
+    // Use setter method if present; otherwise, set the property directly.
+    if (typeof object[setter] === 'function')
+      object[setter](value);
+    else
+      object[property] = value;
+  }
+
+  describe('FileSchemaTestClass', function() {
+    it('should create an instance of FileSchemaTestClass', function() {
+      // uncomment below and update the code to test FileSchemaTestClass
+      //var instance = new OpenApiPetstore.FileSchemaTestClass();
+      //expect(instance).to.be.a(OpenApiPetstore.FileSchemaTestClass);
+    });
+
+    it('should have the property file (base name: "file")', function() {
+      // uncomment below and update the code to test the property file
+      //var instance = new OpenApiPetstore.FileSchemaTestClass();
+      //expect(instance).to.be();
+    });
+
+    it('should have the property files (base name: "files")', function() {
+      // uncomment below and update the code to test the property files
+      //var instance = new OpenApiPetstore.FileSchemaTestClass();
+      //expect(instance).to.be();
+    });
+
+  });
+
+}));
diff --git a/samples/client/petstore/javascript-promise/test/model/StringBooleanMap.spec.js b/samples/client/petstore/javascript-promise/test/model/StringBooleanMap.spec.js
new file mode 100644
index 000000000000..c14a469bcf5f
--- /dev/null
+++ b/samples/client/petstore/javascript-promise/test/model/StringBooleanMap.spec.js
@@ -0,0 +1,61 @@
+/**
+ * OpenAPI Petstore
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * OpenAPI spec version: 1.0.0
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ *
+ * OpenAPI Generator version: 3.2.0-SNAPSHOT
+ *
+ * Do not edit the class manually.
+ *
+ */
+
+(function(root, factory) {
+  if (typeof define === 'function' && define.amd) {
+    // AMD.
+    define(['expect.js', '../../src/index'], factory);
+  } else if (typeof module === 'object' && module.exports) {
+    // CommonJS-like environments that support module.exports, like Node.
+    factory(require('expect.js'), require('../../src/index'));
+  } else {
+    // Browser globals (root is window)
+    factory(root.expect, root.OpenApiPetstore);
+  }
+}(this, function(expect, OpenApiPetstore) {
+  'use strict';
+
+  var instance;
+
+  beforeEach(function() {
+    instance = new OpenApiPetstore.StringBooleanMap();
+  });
+
+  var getProperty = function(object, getter, property) {
+    // Use getter method if present; otherwise, get the property directly.
+    if (typeof object[getter] === 'function')
+      return object[getter]();
+    else
+      return object[property];
+  }
+
+  var setProperty = function(object, setter, property, value) {
+    // Use setter method if present; otherwise, set the property directly.
+    if (typeof object[setter] === 'function')
+      object[setter](value);
+    else
+      object[property] = value;
+  }
+
+  describe('StringBooleanMap', function() {
+    it('should create an instance of StringBooleanMap', function() {
+      // uncomment below and update the code to test StringBooleanMap
+      //var instance = new OpenApiPetstore.StringBooleanMap();
+      //expect(instance).to.be.a(OpenApiPetstore.StringBooleanMap);
+    });
+
+  });
+
+}));
diff --git a/samples/client/petstore/javascript/.openapi-generator/VERSION b/samples/client/petstore/javascript/.openapi-generator/VERSION
index 1c00c5181548..14900cee60e8 100644
--- a/samples/client/petstore/javascript/.openapi-generator/VERSION
+++ b/samples/client/petstore/javascript/.openapi-generator/VERSION
@@ -1 +1 @@
-3.0.2-SNAPSHOT
\ No newline at end of file
+3.2.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/javascript/README.md b/samples/client/petstore/javascript/README.md
index 9d9637737d0c..5283d7248f67 100644
--- a/samples/client/petstore/javascript/README.md
+++ b/samples/client/petstore/javascript/README.md
@@ -105,7 +105,7 @@ var callback = function(error, data, response) {
     console.log('API called successfully. Returned data: ' + data);
   }
 };
-api.testSpecialTags(client, callback);
+api.call123testSpecialTags(client, callback);
 
 ```
 
@@ -115,11 +115,12 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
 
 Class | Method | HTTP request | Description
 ------------ | ------------- | ------------- | -------------
-*OpenApiPetstore.AnotherFakeApi* | [**testSpecialTags**](docs/AnotherFakeApi.md#testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags
+*OpenApiPetstore.AnotherFakeApi* | [**call123testSpecialTags**](docs/AnotherFakeApi.md#call123testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags
 *OpenApiPetstore.FakeApi* | [**fakeOuterBooleanSerialize**](docs/FakeApi.md#fakeOuterBooleanSerialize) | **POST** /fake/outer/boolean | 
 *OpenApiPetstore.FakeApi* | [**fakeOuterCompositeSerialize**](docs/FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite | 
 *OpenApiPetstore.FakeApi* | [**fakeOuterNumberSerialize**](docs/FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number | 
 *OpenApiPetstore.FakeApi* | [**fakeOuterStringSerialize**](docs/FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string | 
+*OpenApiPetstore.FakeApi* | [**testBodyWithFileSchema**](docs/FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | 
 *OpenApiPetstore.FakeApi* | [**testBodyWithQueryParams**](docs/FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | 
 *OpenApiPetstore.FakeApi* | [**testClientModel**](docs/FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model
 *OpenApiPetstore.FakeApi* | [**testEndpointParameters**](docs/FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 
@@ -135,6 +136,7 @@ Class | Method | HTTP request | Description
 *OpenApiPetstore.PetApi* | [**updatePet**](docs/PetApi.md#updatePet) | **PUT** /pet | Update an existing pet
 *OpenApiPetstore.PetApi* | [**updatePetWithForm**](docs/PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data
 *OpenApiPetstore.PetApi* | [**uploadFile**](docs/PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image
+*OpenApiPetstore.PetApi* | [**uploadFileWithRequiredFile**](docs/PetApi.md#uploadFileWithRequiredFile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required)
 *OpenApiPetstore.StoreApi* | [**deleteOrder**](docs/StoreApi.md#deleteOrder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID
 *OpenApiPetstore.StoreApi* | [**getInventory**](docs/StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status
 *OpenApiPetstore.StoreApi* | [**getOrderById**](docs/StoreApi.md#getOrderById) | **GET** /store/order/{order_id} | Find purchase order by ID
@@ -167,6 +169,8 @@ Class | Method | HTTP request | Description
  - [OpenApiPetstore.EnumArrays](docs/EnumArrays.md)
  - [OpenApiPetstore.EnumClass](docs/EnumClass.md)
  - [OpenApiPetstore.EnumTest](docs/EnumTest.md)
+ - [OpenApiPetstore.File](docs/File.md)
+ - [OpenApiPetstore.FileSchemaTestClass](docs/FileSchemaTestClass.md)
  - [OpenApiPetstore.FormatTest](docs/FormatTest.md)
  - [OpenApiPetstore.HasOnlyReadOnly](docs/HasOnlyReadOnly.md)
  - [OpenApiPetstore.List](docs/List.md)
@@ -182,6 +186,7 @@ Class | Method | HTTP request | Description
  - [OpenApiPetstore.Pet](docs/Pet.md)
  - [OpenApiPetstore.ReadOnlyFirst](docs/ReadOnlyFirst.md)
  - [OpenApiPetstore.SpecialModelName](docs/SpecialModelName.md)
+ - [OpenApiPetstore.StringBooleanMap](docs/StringBooleanMap.md)
  - [OpenApiPetstore.Tag](docs/Tag.md)
  - [OpenApiPetstore.User](docs/User.md)
 
diff --git a/samples/client/petstore/javascript/docs/AnotherFakeApi.md b/samples/client/petstore/javascript/docs/AnotherFakeApi.md
index 4529aa0c18b0..a334daa2e433 100644
--- a/samples/client/petstore/javascript/docs/AnotherFakeApi.md
+++ b/samples/client/petstore/javascript/docs/AnotherFakeApi.md
@@ -4,16 +4,16 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
 
 Method | HTTP request | Description
 ------------- | ------------- | -------------
-[**testSpecialTags**](AnotherFakeApi.md#testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags
+[**call123testSpecialTags**](AnotherFakeApi.md#call123testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags
 
 
-
-# **testSpecialTags**
-> Client testSpecialTags(client)
+
+# **call123testSpecialTags**
+> Client call123testSpecialTags(client)
 
 To test special tags
 
-To test special tags
+To test special tags and operation ID starting with number
 
 ### Example
 ```javascript
@@ -28,7 +28,7 @@ var callback = function(error, data, response) {
     console.log('API called successfully. Returned data: ' + data);
   }
 };
-apiInstance.testSpecialTags(client, callback);
+apiInstance.call123testSpecialTags(client, callback);
 ```
 
 ### Parameters
diff --git a/samples/client/petstore/javascript/docs/FakeApi.md b/samples/client/petstore/javascript/docs/FakeApi.md
index e0aa348e9011..73f3740d199e 100644
--- a/samples/client/petstore/javascript/docs/FakeApi.md
+++ b/samples/client/petstore/javascript/docs/FakeApi.md
@@ -8,6 +8,7 @@ Method | HTTP request | Description
 [**fakeOuterCompositeSerialize**](FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite | 
 [**fakeOuterNumberSerialize**](FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number | 
 [**fakeOuterStringSerialize**](FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string | 
+[**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | 
 [**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | 
 [**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model
 [**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 
@@ -196,6 +197,49 @@ No authorization required
  - **Content-Type**: Not defined
  - **Accept**: */*
 
+
+# **testBodyWithFileSchema**
+> testBodyWithFileSchema(fileSchemaTestClass)
+
+
+
+For this test, the body for this request much reference a schema named `File`.
+
+### Example
+```javascript
+var OpenApiPetstore = require('open_api_petstore');
+
+var apiInstance = new OpenApiPetstore.FakeApi();
+var fileSchemaTestClass = new OpenApiPetstore.FileSchemaTestClass(); // FileSchemaTestClass | 
+var callback = function(error, data, response) {
+  if (error) {
+    console.error(error);
+  } else {
+    console.log('API called successfully.');
+  }
+};
+apiInstance.testBodyWithFileSchema(fileSchemaTestClass, callback);
+```
+
+### Parameters
+
+Name | Type | Description  | Notes
+------------- | ------------- | ------------- | -------------
+ **fileSchemaTestClass** | [**FileSchemaTestClass**](FileSchemaTestClass.md)|  | 
+
+### Return type
+
+null (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: Not defined
+
 
 # **testBodyWithQueryParams**
 > testBodyWithQueryParams(query, user)
diff --git a/samples/client/petstore/javascript/docs/File.md b/samples/client/petstore/javascript/docs/File.md
new file mode 100644
index 000000000000..a34d76a3e46e
--- /dev/null
+++ b/samples/client/petstore/javascript/docs/File.md
@@ -0,0 +1,8 @@
+# OpenApiPetstore.File
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**sourceURI** | **String** | Test capitalization | [optional] 
+
+
diff --git a/samples/client/petstore/javascript/docs/FileSchemaTestClass.md b/samples/client/petstore/javascript/docs/FileSchemaTestClass.md
new file mode 100644
index 000000000000..3ccb4162dcc1
--- /dev/null
+++ b/samples/client/petstore/javascript/docs/FileSchemaTestClass.md
@@ -0,0 +1,9 @@
+# OpenApiPetstore.FileSchemaTestClass
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**file** | **File** |  | [optional] 
+**files** | **[File]** |  | [optional] 
+
+
diff --git a/samples/client/petstore/javascript/docs/MapTest.md b/samples/client/petstore/javascript/docs/MapTest.md
index 4a128da00fd0..f1075bf0681f 100644
--- a/samples/client/petstore/javascript/docs/MapTest.md
+++ b/samples/client/petstore/javascript/docs/MapTest.md
@@ -5,6 +5,8 @@ Name | Type | Description | Notes
 ------------ | ------------- | ------------- | -------------
 **mapMapOfString** | **{String: {String: String}}** |  | [optional] 
 **mapOfEnumString** | **{String: String}** |  | [optional] 
+**directMap** | **{String: Boolean}** |  | [optional] 
+**indirectMap** | [**StringBooleanMap**](StringBooleanMap.md) |  | [optional] 
 
 
 
diff --git a/samples/client/petstore/javascript/docs/PetApi.md b/samples/client/petstore/javascript/docs/PetApi.md
index fbcca8372ccc..265fc5a9b254 100644
--- a/samples/client/petstore/javascript/docs/PetApi.md
+++ b/samples/client/petstore/javascript/docs/PetApi.md
@@ -12,6 +12,7 @@ Method | HTTP request | Description
 [**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet
 [**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data
 [**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image
+[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required)
 
 
 
@@ -398,3 +399,54 @@ Name | Type | Description  | Notes
  - **Content-Type**: multipart/form-data
  - **Accept**: application/json
 
+
+# **uploadFileWithRequiredFile**
+> ApiResponse uploadFileWithRequiredFile(petId, requiredFile, opts)
+
+uploads an image (required)
+
+### Example
+```javascript
+var OpenApiPetstore = require('open_api_petstore');
+var defaultClient = OpenApiPetstore.ApiClient.instance;
+// Configure OAuth2 access token for authorization: petstore_auth
+var petstore_auth = defaultClient.authentications['petstore_auth'];
+petstore_auth.accessToken = 'YOUR ACCESS TOKEN';
+
+var apiInstance = new OpenApiPetstore.PetApi();
+var petId = 789; // Number | ID of pet to update
+var requiredFile = "/path/to/file"; // File | file to upload
+var opts = {
+  'additionalMetadata': "additionalMetadata_example" // String | Additional data to pass to server
+};
+var callback = function(error, data, response) {
+  if (error) {
+    console.error(error);
+  } else {
+    console.log('API called successfully. Returned data: ' + data);
+  }
+};
+apiInstance.uploadFileWithRequiredFile(petId, requiredFile, opts, callback);
+```
+
+### Parameters
+
+Name | Type | Description  | Notes
+------------- | ------------- | ------------- | -------------
+ **petId** | **Number**| ID of pet to update | 
+ **requiredFile** | **File**| file to upload | 
+ **additionalMetadata** | **String**| Additional data to pass to server | [optional] 
+
+### Return type
+
+[**ApiResponse**](ApiResponse.md)
+
+### Authorization
+
+[petstore_auth](../README.md#petstore_auth)
+
+### HTTP request headers
+
+ - **Content-Type**: multipart/form-data
+ - **Accept**: application/json
+
diff --git a/samples/client/petstore/javascript/docs/StringBooleanMap.md b/samples/client/petstore/javascript/docs/StringBooleanMap.md
new file mode 100644
index 000000000000..195a7d57677f
--- /dev/null
+++ b/samples/client/petstore/javascript/docs/StringBooleanMap.md
@@ -0,0 +1,7 @@
+# OpenApiPetstore.StringBooleanMap
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+
+
diff --git a/samples/client/petstore/javascript/package.json b/samples/client/petstore/javascript/package.json
index 6cee1971957b..6fcefce10bad 100644
--- a/samples/client/petstore/javascript/package.json
+++ b/samples/client/petstore/javascript/package.json
@@ -11,7 +11,7 @@
     "fs": false
   },
   "dependencies": {
-    "superagent": "3.5.2"
+    "superagent": "3.7.0"
   },
   "devDependencies": {
     "mocha": "~2.3.4",
diff --git a/samples/client/petstore/javascript/src/ApiClient.js b/samples/client/petstore/javascript/src/ApiClient.js
index f43711962b0a..666b55968cd9 100644
--- a/samples/client/petstore/javascript/src/ApiClient.js
+++ b/samples/client/petstore/javascript/src/ApiClient.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript/src/api/AnotherFakeApi.js b/samples/client/petstore/javascript/src/api/AnotherFakeApi.js
index 73b690b0d56d..5075bf8ee34b 100644
--- a/samples/client/petstore/javascript/src/api/AnotherFakeApi.js
+++ b/samples/client/petstore/javascript/src/api/AnotherFakeApi.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
@@ -48,8 +48,8 @@
 
 
     /**
-     * Callback function to receive the result of the testSpecialTags operation.
-     * @callback module:api/AnotherFakeApi~testSpecialTagsCallback
+     * Callback function to receive the result of the call123testSpecialTags operation.
+     * @callback module:api/AnotherFakeApi~call123testSpecialTagsCallback
      * @param {String} error Error message, if any.
      * @param {module:model/Client} data The data returned by the service call.
      * @param {String} response The complete HTTP response.
@@ -57,17 +57,17 @@
 
     /**
      * To test special tags
-     * To test special tags
+     * To test special tags and operation ID starting with number
      * @param {module:model/Client} client client model
-     * @param {module:api/AnotherFakeApi~testSpecialTagsCallback} callback The callback function, accepting three arguments: error, data, response
+     * @param {module:api/AnotherFakeApi~call123testSpecialTagsCallback} callback The callback function, accepting three arguments: error, data, response
      * data is of type: {@link module:model/Client}
      */
-    this.testSpecialTags = function(client, callback) {
+    this.call123testSpecialTags = function(client, callback) {
       var postBody = client;
 
       // verify the required parameter 'client' is set
       if (client === undefined || client === null) {
-        throw new Error("Missing the required parameter 'client' when calling testSpecialTags");
+        throw new Error("Missing the required parameter 'client' when calling call123testSpecialTags");
       }
 
 
diff --git a/samples/client/petstore/javascript/src/api/FakeApi.js b/samples/client/petstore/javascript/src/api/FakeApi.js
index 71cb70f8be7c..56d61947600a 100644
--- a/samples/client/petstore/javascript/src/api/FakeApi.js
+++ b/samples/client/petstore/javascript/src/api/FakeApi.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
@@ -16,18 +16,18 @@
 (function(root, factory) {
   if (typeof define === 'function' && define.amd) {
     // AMD. Register as an anonymous module.
-    define(['ApiClient', 'model/Client', 'model/OuterComposite', 'model/User'], factory);
+    define(['ApiClient', 'model/Client', 'model/FileSchemaTestClass', 'model/OuterComposite', 'model/User'], factory);
   } else if (typeof module === 'object' && module.exports) {
     // CommonJS-like environments that support module.exports, like Node.
-    module.exports = factory(require('../ApiClient'), require('../model/Client'), require('../model/OuterComposite'), require('../model/User'));
+    module.exports = factory(require('../ApiClient'), require('../model/Client'), require('../model/FileSchemaTestClass'), require('../model/OuterComposite'), require('../model/User'));
   } else {
     // Browser globals (root is window)
     if (!root.OpenApiPetstore) {
       root.OpenApiPetstore = {};
     }
-    root.OpenApiPetstore.FakeApi = factory(root.OpenApiPetstore.ApiClient, root.OpenApiPetstore.Client, root.OpenApiPetstore.OuterComposite, root.OpenApiPetstore.User);
+    root.OpenApiPetstore.FakeApi = factory(root.OpenApiPetstore.ApiClient, root.OpenApiPetstore.Client, root.OpenApiPetstore.FileSchemaTestClass, root.OpenApiPetstore.OuterComposite, root.OpenApiPetstore.User);
   }
-}(this, function(ApiClient, Client, OuterComposite, User) {
+}(this, function(ApiClient, Client, FileSchemaTestClass, OuterComposite, User) {
   'use strict';
 
   /**
@@ -219,6 +219,51 @@
       );
     }
 
+    /**
+     * Callback function to receive the result of the testBodyWithFileSchema operation.
+     * @callback module:api/FakeApi~testBodyWithFileSchemaCallback
+     * @param {String} error Error message, if any.
+     * @param data This operation does not return a value.
+     * @param {String} response The complete HTTP response.
+     */
+
+    /**
+     * For this test, the body for this request much reference a schema named `File`.
+     * @param {module:model/FileSchemaTestClass} fileSchemaTestClass 
+     * @param {module:api/FakeApi~testBodyWithFileSchemaCallback} callback The callback function, accepting three arguments: error, data, response
+     */
+    this.testBodyWithFileSchema = function(fileSchemaTestClass, callback) {
+      var postBody = fileSchemaTestClass;
+
+      // verify the required parameter 'fileSchemaTestClass' is set
+      if (fileSchemaTestClass === undefined || fileSchemaTestClass === null) {
+        throw new Error("Missing the required parameter 'fileSchemaTestClass' when calling testBodyWithFileSchema");
+      }
+
+
+      var pathParams = {
+      };
+      var queryParams = {
+      };
+      var collectionQueryParams = {
+      };
+      var headerParams = {
+      };
+      var formParams = {
+      };
+
+      var authNames = [];
+      var contentTypes = ['application/json'];
+      var accepts = [];
+      var returnType = null;
+
+      return this.apiClient.callApi(
+        '/fake/body-with-file-schema', 'PUT',
+        pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
+        authNames, contentTypes, accepts, returnType, callback
+      );
+    }
+
     /**
      * Callback function to receive the result of the testBodyWithQueryParams operation.
      * @callback module:api/FakeApi~testBodyWithQueryParamsCallback
diff --git a/samples/client/petstore/javascript/src/api/FakeClassnameTags123Api.js b/samples/client/petstore/javascript/src/api/FakeClassnameTags123Api.js
index 469890d60bbb..9384dce1b7d2 100644
--- a/samples/client/petstore/javascript/src/api/FakeClassnameTags123Api.js
+++ b/samples/client/petstore/javascript/src/api/FakeClassnameTags123Api.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript/src/api/PetApi.js b/samples/client/petstore/javascript/src/api/PetApi.js
index 840cb2fa67e9..34bd8e70ddc2 100644
--- a/samples/client/petstore/javascript/src/api/PetApi.js
+++ b/samples/client/petstore/javascript/src/api/PetApi.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
@@ -441,6 +441,64 @@
         authNames, contentTypes, accepts, returnType, callback
       );
     }
+
+    /**
+     * Callback function to receive the result of the uploadFileWithRequiredFile operation.
+     * @callback module:api/PetApi~uploadFileWithRequiredFileCallback
+     * @param {String} error Error message, if any.
+     * @param {module:model/ApiResponse} data The data returned by the service call.
+     * @param {String} response The complete HTTP response.
+     */
+
+    /**
+     * uploads an image (required)
+     * @param {Number} petId ID of pet to update
+     * @param {File} requiredFile file to upload
+     * @param {Object} opts Optional parameters
+     * @param {String} opts.additionalMetadata Additional data to pass to server
+     * @param {module:api/PetApi~uploadFileWithRequiredFileCallback} callback The callback function, accepting three arguments: error, data, response
+     * data is of type: {@link module:model/ApiResponse}
+     */
+    this.uploadFileWithRequiredFile = function(petId, requiredFile, opts, callback) {
+      opts = opts || {};
+      var postBody = null;
+
+      // verify the required parameter 'petId' is set
+      if (petId === undefined || petId === null) {
+        throw new Error("Missing the required parameter 'petId' when calling uploadFileWithRequiredFile");
+      }
+
+      // verify the required parameter 'requiredFile' is set
+      if (requiredFile === undefined || requiredFile === null) {
+        throw new Error("Missing the required parameter 'requiredFile' when calling uploadFileWithRequiredFile");
+      }
+
+
+      var pathParams = {
+        'petId': petId
+      };
+      var queryParams = {
+      };
+      var collectionQueryParams = {
+      };
+      var headerParams = {
+      };
+      var formParams = {
+        'additionalMetadata': opts['additionalMetadata'],
+        'requiredFile': requiredFile
+      };
+
+      var authNames = ['petstore_auth'];
+      var contentTypes = ['multipart/form-data'];
+      var accepts = ['application/json'];
+      var returnType = ApiResponse;
+
+      return this.apiClient.callApi(
+        '/fake/{petId}/uploadImageWithRequiredFile', 'POST',
+        pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
+        authNames, contentTypes, accepts, returnType, callback
+      );
+    }
   };
 
   return exports;
diff --git a/samples/client/petstore/javascript/src/api/StoreApi.js b/samples/client/petstore/javascript/src/api/StoreApi.js
index ba2c675ec771..33216d30b39c 100644
--- a/samples/client/petstore/javascript/src/api/StoreApi.js
+++ b/samples/client/petstore/javascript/src/api/StoreApi.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript/src/api/UserApi.js b/samples/client/petstore/javascript/src/api/UserApi.js
index d3e3b8513c55..4ca5eb45ee76 100644
--- a/samples/client/petstore/javascript/src/api/UserApi.js
+++ b/samples/client/petstore/javascript/src/api/UserApi.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript/src/index.js b/samples/client/petstore/javascript/src/index.js
index 25685095fb2f..3f904b570cab 100644
--- a/samples/client/petstore/javascript/src/index.js
+++ b/samples/client/petstore/javascript/src/index.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
@@ -16,12 +16,12 @@
 (function(factory) {
   if (typeof define === 'function' && define.amd) {
     // AMD. Register as an anonymous module.
-    define(['ApiClient', 'model/AdditionalPropertiesClass', 'model/Animal', 'model/AnimalFarm', 'model/ApiResponse', 'model/ArrayOfArrayOfNumberOnly', 'model/ArrayOfNumberOnly', 'model/ArrayTest', 'model/Capitalization', 'model/Cat', 'model/Category', 'model/ClassModel', 'model/Client', 'model/Dog', 'model/EnumArrays', 'model/EnumClass', 'model/EnumTest', 'model/FormatTest', 'model/HasOnlyReadOnly', 'model/List', 'model/MapTest', 'model/MixedPropertiesAndAdditionalPropertiesClass', 'model/Model200Response', 'model/ModelReturn', 'model/Name', 'model/NumberOnly', 'model/Order', 'model/OuterComposite', 'model/OuterEnum', 'model/Pet', 'model/ReadOnlyFirst', 'model/SpecialModelName', 'model/Tag', 'model/User', 'api/AnotherFakeApi', 'api/FakeApi', 'api/FakeClassnameTags123Api', 'api/PetApi', 'api/StoreApi', 'api/UserApi'], factory);
+    define(['ApiClient', 'model/AdditionalPropertiesClass', 'model/Animal', 'model/AnimalFarm', 'model/ApiResponse', 'model/ArrayOfArrayOfNumberOnly', 'model/ArrayOfNumberOnly', 'model/ArrayTest', 'model/Capitalization', 'model/Cat', 'model/Category', 'model/ClassModel', 'model/Client', 'model/Dog', 'model/EnumArrays', 'model/EnumClass', 'model/EnumTest', 'model/File', 'model/FileSchemaTestClass', 'model/FormatTest', 'model/HasOnlyReadOnly', 'model/List', 'model/MapTest', 'model/MixedPropertiesAndAdditionalPropertiesClass', 'model/Model200Response', 'model/ModelReturn', 'model/Name', 'model/NumberOnly', 'model/Order', 'model/OuterComposite', 'model/OuterEnum', 'model/Pet', 'model/ReadOnlyFirst', 'model/SpecialModelName', 'model/StringBooleanMap', 'model/Tag', 'model/User', 'api/AnotherFakeApi', 'api/FakeApi', 'api/FakeClassnameTags123Api', 'api/PetApi', 'api/StoreApi', 'api/UserApi'], factory);
   } else if (typeof module === 'object' && module.exports) {
     // CommonJS-like environments that support module.exports, like Node.
-    module.exports = factory(require('./ApiClient'), require('./model/AdditionalPropertiesClass'), require('./model/Animal'), require('./model/AnimalFarm'), require('./model/ApiResponse'), require('./model/ArrayOfArrayOfNumberOnly'), require('./model/ArrayOfNumberOnly'), require('./model/ArrayTest'), require('./model/Capitalization'), require('./model/Cat'), require('./model/Category'), require('./model/ClassModel'), require('./model/Client'), require('./model/Dog'), require('./model/EnumArrays'), require('./model/EnumClass'), require('./model/EnumTest'), require('./model/FormatTest'), require('./model/HasOnlyReadOnly'), require('./model/List'), require('./model/MapTest'), require('./model/MixedPropertiesAndAdditionalPropertiesClass'), require('./model/Model200Response'), require('./model/ModelReturn'), require('./model/Name'), require('./model/NumberOnly'), require('./model/Order'), require('./model/OuterComposite'), require('./model/OuterEnum'), require('./model/Pet'), require('./model/ReadOnlyFirst'), require('./model/SpecialModelName'), require('./model/Tag'), require('./model/User'), require('./api/AnotherFakeApi'), require('./api/FakeApi'), require('./api/FakeClassnameTags123Api'), require('./api/PetApi'), require('./api/StoreApi'), require('./api/UserApi'));
+    module.exports = factory(require('./ApiClient'), require('./model/AdditionalPropertiesClass'), require('./model/Animal'), require('./model/AnimalFarm'), require('./model/ApiResponse'), require('./model/ArrayOfArrayOfNumberOnly'), require('./model/ArrayOfNumberOnly'), require('./model/ArrayTest'), require('./model/Capitalization'), require('./model/Cat'), require('./model/Category'), require('./model/ClassModel'), require('./model/Client'), require('./model/Dog'), require('./model/EnumArrays'), require('./model/EnumClass'), require('./model/EnumTest'), require('./model/File'), require('./model/FileSchemaTestClass'), require('./model/FormatTest'), require('./model/HasOnlyReadOnly'), require('./model/List'), require('./model/MapTest'), require('./model/MixedPropertiesAndAdditionalPropertiesClass'), require('./model/Model200Response'), require('./model/ModelReturn'), require('./model/Name'), require('./model/NumberOnly'), require('./model/Order'), require('./model/OuterComposite'), require('./model/OuterEnum'), require('./model/Pet'), require('./model/ReadOnlyFirst'), require('./model/SpecialModelName'), require('./model/StringBooleanMap'), require('./model/Tag'), require('./model/User'), require('./api/AnotherFakeApi'), require('./api/FakeApi'), require('./api/FakeClassnameTags123Api'), require('./api/PetApi'), require('./api/StoreApi'), require('./api/UserApi'));
   }
-}(function(ApiClient, AdditionalPropertiesClass, Animal, AnimalFarm, ApiResponse, ArrayOfArrayOfNumberOnly, ArrayOfNumberOnly, ArrayTest, Capitalization, Cat, Category, ClassModel, Client, Dog, EnumArrays, EnumClass, EnumTest, FormatTest, HasOnlyReadOnly, List, MapTest, MixedPropertiesAndAdditionalPropertiesClass, Model200Response, ModelReturn, Name, NumberOnly, Order, OuterComposite, OuterEnum, Pet, ReadOnlyFirst, SpecialModelName, Tag, User, AnotherFakeApi, FakeApi, FakeClassnameTags123Api, PetApi, StoreApi, UserApi) {
+}(function(ApiClient, AdditionalPropertiesClass, Animal, AnimalFarm, ApiResponse, ArrayOfArrayOfNumberOnly, ArrayOfNumberOnly, ArrayTest, Capitalization, Cat, Category, ClassModel, Client, Dog, EnumArrays, EnumClass, EnumTest, File, FileSchemaTestClass, FormatTest, HasOnlyReadOnly, List, MapTest, MixedPropertiesAndAdditionalPropertiesClass, Model200Response, ModelReturn, Name, NumberOnly, Order, OuterComposite, OuterEnum, Pet, ReadOnlyFirst, SpecialModelName, StringBooleanMap, Tag, User, AnotherFakeApi, FakeApi, FakeClassnameTags123Api, PetApi, StoreApi, UserApi) {
   'use strict';
 
   /**
@@ -141,6 +141,16 @@
      * @property {module:model/EnumTest}
      */
     EnumTest: EnumTest,
+    /**
+     * The File model constructor.
+     * @property {module:model/File}
+     */
+    File: File,
+    /**
+     * The FileSchemaTestClass model constructor.
+     * @property {module:model/FileSchemaTestClass}
+     */
+    FileSchemaTestClass: FileSchemaTestClass,
     /**
      * The FormatTest model constructor.
      * @property {module:model/FormatTest}
@@ -216,6 +226,11 @@
      * @property {module:model/SpecialModelName}
      */
     SpecialModelName: SpecialModelName,
+    /**
+     * The StringBooleanMap model constructor.
+     * @property {module:model/StringBooleanMap}
+     */
+    StringBooleanMap: StringBooleanMap,
     /**
      * The Tag model constructor.
      * @property {module:model/Tag}
diff --git a/samples/client/petstore/javascript/src/model/AdditionalPropertiesClass.js b/samples/client/petstore/javascript/src/model/AdditionalPropertiesClass.js
index 08572d900840..3e41a2906a5b 100644
--- a/samples/client/petstore/javascript/src/model/AdditionalPropertiesClass.js
+++ b/samples/client/petstore/javascript/src/model/AdditionalPropertiesClass.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript/src/model/Animal.js b/samples/client/petstore/javascript/src/model/Animal.js
index 29376d771bfc..5ec0fe427cb4 100644
--- a/samples/client/petstore/javascript/src/model/Animal.js
+++ b/samples/client/petstore/javascript/src/model/Animal.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript/src/model/AnimalFarm.js b/samples/client/petstore/javascript/src/model/AnimalFarm.js
index e1a4797eec19..f80991972452 100644
--- a/samples/client/petstore/javascript/src/model/AnimalFarm.js
+++ b/samples/client/petstore/javascript/src/model/AnimalFarm.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript/src/model/ApiResponse.js b/samples/client/petstore/javascript/src/model/ApiResponse.js
index 5c112418181d..d3236a99234a 100644
--- a/samples/client/petstore/javascript/src/model/ApiResponse.js
+++ b/samples/client/petstore/javascript/src/model/ApiResponse.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript/src/model/ArrayOfArrayOfNumberOnly.js b/samples/client/petstore/javascript/src/model/ArrayOfArrayOfNumberOnly.js
index 024c26469df3..e7ac7b24a330 100644
--- a/samples/client/petstore/javascript/src/model/ArrayOfArrayOfNumberOnly.js
+++ b/samples/client/petstore/javascript/src/model/ArrayOfArrayOfNumberOnly.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript/src/model/ArrayOfNumberOnly.js b/samples/client/petstore/javascript/src/model/ArrayOfNumberOnly.js
index ca79a7c2a6d0..7c98321c3d4b 100644
--- a/samples/client/petstore/javascript/src/model/ArrayOfNumberOnly.js
+++ b/samples/client/petstore/javascript/src/model/ArrayOfNumberOnly.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript/src/model/ArrayTest.js b/samples/client/petstore/javascript/src/model/ArrayTest.js
index 01b97a1b5809..0f47e3e78ef1 100644
--- a/samples/client/petstore/javascript/src/model/ArrayTest.js
+++ b/samples/client/petstore/javascript/src/model/ArrayTest.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript/src/model/Capitalization.js b/samples/client/petstore/javascript/src/model/Capitalization.js
index 05934fb253ce..9f5e832699d3 100644
--- a/samples/client/petstore/javascript/src/model/Capitalization.js
+++ b/samples/client/petstore/javascript/src/model/Capitalization.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript/src/model/Cat.js b/samples/client/petstore/javascript/src/model/Cat.js
index 10b787fed4eb..4c1d8f0c845d 100644
--- a/samples/client/petstore/javascript/src/model/Cat.js
+++ b/samples/client/petstore/javascript/src/model/Cat.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript/src/model/Category.js b/samples/client/petstore/javascript/src/model/Category.js
index c289c6b8e5bd..560f1a94013e 100644
--- a/samples/client/petstore/javascript/src/model/Category.js
+++ b/samples/client/petstore/javascript/src/model/Category.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript/src/model/ClassModel.js b/samples/client/petstore/javascript/src/model/ClassModel.js
index 6edd8fbadd04..cadf752c6446 100644
--- a/samples/client/petstore/javascript/src/model/ClassModel.js
+++ b/samples/client/petstore/javascript/src/model/ClassModel.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript/src/model/Client.js b/samples/client/petstore/javascript/src/model/Client.js
index e563bcf7ea59..7bf09ed3ac6f 100644
--- a/samples/client/petstore/javascript/src/model/Client.js
+++ b/samples/client/petstore/javascript/src/model/Client.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript/src/model/Dog.js b/samples/client/petstore/javascript/src/model/Dog.js
index c308f3dc9f11..93f8f38ae13d 100644
--- a/samples/client/petstore/javascript/src/model/Dog.js
+++ b/samples/client/petstore/javascript/src/model/Dog.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript/src/model/EnumArrays.js b/samples/client/petstore/javascript/src/model/EnumArrays.js
index 07d52b119db0..d7b36eb6307e 100644
--- a/samples/client/petstore/javascript/src/model/EnumArrays.js
+++ b/samples/client/petstore/javascript/src/model/EnumArrays.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript/src/model/EnumClass.js b/samples/client/petstore/javascript/src/model/EnumClass.js
index d4a9f39f5661..d2f7c69374b1 100644
--- a/samples/client/petstore/javascript/src/model/EnumClass.js
+++ b/samples/client/petstore/javascript/src/model/EnumClass.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript/src/model/EnumTest.js b/samples/client/petstore/javascript/src/model/EnumTest.js
index 4dfc6753323a..e6f1a7ea9e47 100644
--- a/samples/client/petstore/javascript/src/model/EnumTest.js
+++ b/samples/client/petstore/javascript/src/model/EnumTest.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript/src/model/File.js b/samples/client/petstore/javascript/src/model/File.js
new file mode 100644
index 000000000000..aa7449e29078
--- /dev/null
+++ b/samples/client/petstore/javascript/src/model/File.js
@@ -0,0 +1,83 @@
+/**
+ * OpenAPI Petstore
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * OpenAPI spec version: 1.0.0
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ *
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
+ *
+ * Do not edit the class manually.
+ *
+ */
+
+(function(root, factory) {
+  if (typeof define === 'function' && define.amd) {
+    // AMD. Register as an anonymous module.
+    define(['ApiClient'], factory);
+  } else if (typeof module === 'object' && module.exports) {
+    // CommonJS-like environments that support module.exports, like Node.
+    module.exports = factory(require('../ApiClient'));
+  } else {
+    // Browser globals (root is window)
+    if (!root.OpenApiPetstore) {
+      root.OpenApiPetstore = {};
+    }
+    root.OpenApiPetstore.File = factory(root.OpenApiPetstore.ApiClient);
+  }
+}(this, function(ApiClient) {
+  'use strict';
+
+
+
+
+  /**
+   * The File model module.
+   * @module model/File
+   * @version 1.0.0
+   */
+
+  /**
+   * Constructs a new File.
+   * Must be named `File` for test.
+   * @alias module:model/File
+   * @class
+   */
+  var exports = function() {
+    var _this = this;
+
+
+  };
+
+  /**
+   * Constructs a File from a plain JavaScript object, optionally creating a new instance.
+   * Copies all relevant properties from data to obj if supplied or a new instance if not.
+   * @param {Object} data The plain JavaScript object bearing properties of interest.
+   * @param {module:model/File} obj Optional instance to populate.
+   * @return {module:model/File} The populated File instance.
+   */
+  exports.constructFromObject = function(data, obj) {
+    if (data) {
+      obj = obj || new exports();
+
+      if (data.hasOwnProperty('sourceURI')) {
+        obj['sourceURI'] = ApiClient.convertToType(data['sourceURI'], 'String');
+      }
+    }
+    return obj;
+  }
+
+  /**
+   * Test capitalization
+   * @member {String} sourceURI
+   */
+  exports.prototype['sourceURI'] = undefined;
+
+
+
+  return exports;
+}));
+
+
diff --git a/samples/client/petstore/javascript/src/model/FileSchemaTestClass.js b/samples/client/petstore/javascript/src/model/FileSchemaTestClass.js
new file mode 100644
index 000000000000..f2f1b8e966a3
--- /dev/null
+++ b/samples/client/petstore/javascript/src/model/FileSchemaTestClass.js
@@ -0,0 +1,89 @@
+/**
+ * OpenAPI Petstore
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * OpenAPI spec version: 1.0.0
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ *
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
+ *
+ * Do not edit the class manually.
+ *
+ */
+
+(function(root, factory) {
+  if (typeof define === 'function' && define.amd) {
+    // AMD. Register as an anonymous module.
+    define(['ApiClient'], factory);
+  } else if (typeof module === 'object' && module.exports) {
+    // CommonJS-like environments that support module.exports, like Node.
+    module.exports = factory(require('../ApiClient'));
+  } else {
+    // Browser globals (root is window)
+    if (!root.OpenApiPetstore) {
+      root.OpenApiPetstore = {};
+    }
+    root.OpenApiPetstore.FileSchemaTestClass = factory(root.OpenApiPetstore.ApiClient);
+  }
+}(this, function(ApiClient) {
+  'use strict';
+
+
+
+
+  /**
+   * The FileSchemaTestClass model module.
+   * @module model/FileSchemaTestClass
+   * @version 1.0.0
+   */
+
+  /**
+   * Constructs a new FileSchemaTestClass.
+   * @alias module:model/FileSchemaTestClass
+   * @class
+   */
+  var exports = function() {
+    var _this = this;
+
+
+
+  };
+
+  /**
+   * Constructs a FileSchemaTestClass from a plain JavaScript object, optionally creating a new instance.
+   * Copies all relevant properties from data to obj if supplied or a new instance if not.
+   * @param {Object} data The plain JavaScript object bearing properties of interest.
+   * @param {module:model/FileSchemaTestClass} obj Optional instance to populate.
+   * @return {module:model/FileSchemaTestClass} The populated FileSchemaTestClass instance.
+   */
+  exports.constructFromObject = function(data, obj) {
+    if (data) {
+      obj = obj || new exports();
+
+      if (data.hasOwnProperty('file')) {
+        obj['file'] = File.constructFromObject(data['file']);
+      }
+      if (data.hasOwnProperty('files')) {
+        obj['files'] = ApiClient.convertToType(data['files'], [File]);
+      }
+    }
+    return obj;
+  }
+
+  /**
+   * @member {File} file
+   */
+  exports.prototype['file'] = undefined;
+  /**
+   * @member {Array.} files
+   */
+  exports.prototype['files'] = undefined;
+
+
+
+  return exports;
+}));
+
+
diff --git a/samples/client/petstore/javascript/src/model/FormatTest.js b/samples/client/petstore/javascript/src/model/FormatTest.js
index 6c5986d48985..ea6d19666136 100644
--- a/samples/client/petstore/javascript/src/model/FormatTest.js
+++ b/samples/client/petstore/javascript/src/model/FormatTest.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript/src/model/HasOnlyReadOnly.js b/samples/client/petstore/javascript/src/model/HasOnlyReadOnly.js
index 484fd0c99910..b6470082caf9 100644
--- a/samples/client/petstore/javascript/src/model/HasOnlyReadOnly.js
+++ b/samples/client/petstore/javascript/src/model/HasOnlyReadOnly.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript/src/model/List.js b/samples/client/petstore/javascript/src/model/List.js
index ab3c2e34e343..3b9f343524e8 100644
--- a/samples/client/petstore/javascript/src/model/List.js
+++ b/samples/client/petstore/javascript/src/model/List.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript/src/model/MapTest.js b/samples/client/petstore/javascript/src/model/MapTest.js
index adf82a358c28..8563624adffe 100644
--- a/samples/client/petstore/javascript/src/model/MapTest.js
+++ b/samples/client/petstore/javascript/src/model/MapTest.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
@@ -16,18 +16,18 @@
 (function(root, factory) {
   if (typeof define === 'function' && define.amd) {
     // AMD. Register as an anonymous module.
-    define(['ApiClient'], factory);
+    define(['ApiClient', 'model/StringBooleanMap'], factory);
   } else if (typeof module === 'object' && module.exports) {
     // CommonJS-like environments that support module.exports, like Node.
-    module.exports = factory(require('../ApiClient'));
+    module.exports = factory(require('../ApiClient'), require('./StringBooleanMap'));
   } else {
     // Browser globals (root is window)
     if (!root.OpenApiPetstore) {
       root.OpenApiPetstore = {};
     }
-    root.OpenApiPetstore.MapTest = factory(root.OpenApiPetstore.ApiClient);
+    root.OpenApiPetstore.MapTest = factory(root.OpenApiPetstore.ApiClient, root.OpenApiPetstore.StringBooleanMap);
   }
-}(this, function(ApiClient) {
+}(this, function(ApiClient, StringBooleanMap) {
   'use strict';
 
 
@@ -49,6 +49,8 @@
 
 
 
+
+
   };
 
   /**
@@ -68,6 +70,12 @@
       if (data.hasOwnProperty('map_of_enum_string')) {
         obj['map_of_enum_string'] = ApiClient.convertToType(data['map_of_enum_string'], {'String': 'String'});
       }
+      if (data.hasOwnProperty('direct_map')) {
+        obj['direct_map'] = ApiClient.convertToType(data['direct_map'], {'String': 'Boolean'});
+      }
+      if (data.hasOwnProperty('indirect_map')) {
+        obj['indirect_map'] = StringBooleanMap.constructFromObject(data['indirect_map']);
+      }
     }
     return obj;
   }
@@ -80,6 +88,14 @@
    * @member {Object.} map_of_enum_string
    */
   exports.prototype['map_of_enum_string'] = undefined;
+  /**
+   * @member {Object.} direct_map
+   */
+  exports.prototype['direct_map'] = undefined;
+  /**
+   * @member {module:model/StringBooleanMap} indirect_map
+   */
+  exports.prototype['indirect_map'] = undefined;
 
 
   /**
diff --git a/samples/client/petstore/javascript/src/model/MixedPropertiesAndAdditionalPropertiesClass.js b/samples/client/petstore/javascript/src/model/MixedPropertiesAndAdditionalPropertiesClass.js
index 62c7a2f59e32..ff56b0e4981c 100644
--- a/samples/client/petstore/javascript/src/model/MixedPropertiesAndAdditionalPropertiesClass.js
+++ b/samples/client/petstore/javascript/src/model/MixedPropertiesAndAdditionalPropertiesClass.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript/src/model/Model200Response.js b/samples/client/petstore/javascript/src/model/Model200Response.js
index 84131169fb13..665e9d64f653 100644
--- a/samples/client/petstore/javascript/src/model/Model200Response.js
+++ b/samples/client/petstore/javascript/src/model/Model200Response.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript/src/model/ModelReturn.js b/samples/client/petstore/javascript/src/model/ModelReturn.js
index 87484d2ee234..836fab1b221c 100644
--- a/samples/client/petstore/javascript/src/model/ModelReturn.js
+++ b/samples/client/petstore/javascript/src/model/ModelReturn.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript/src/model/Name.js b/samples/client/petstore/javascript/src/model/Name.js
index 8c851c4cec54..24d63b4836f8 100644
--- a/samples/client/petstore/javascript/src/model/Name.js
+++ b/samples/client/petstore/javascript/src/model/Name.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript/src/model/NumberOnly.js b/samples/client/petstore/javascript/src/model/NumberOnly.js
index 389ad08e8c5c..b50c8dadc269 100644
--- a/samples/client/petstore/javascript/src/model/NumberOnly.js
+++ b/samples/client/petstore/javascript/src/model/NumberOnly.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript/src/model/Order.js b/samples/client/petstore/javascript/src/model/Order.js
index bfd5f3714bef..5abd1899c042 100644
--- a/samples/client/petstore/javascript/src/model/Order.js
+++ b/samples/client/petstore/javascript/src/model/Order.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript/src/model/OuterComposite.js b/samples/client/petstore/javascript/src/model/OuterComposite.js
index b4fc48476dee..7410237332e4 100644
--- a/samples/client/petstore/javascript/src/model/OuterComposite.js
+++ b/samples/client/petstore/javascript/src/model/OuterComposite.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
@@ -64,13 +64,13 @@
       obj = obj || new exports();
 
       if (data.hasOwnProperty('my_number')) {
-        obj['my_number'] = 'Number'.constructFromObject(data['my_number']);
+        obj['my_number'] = ApiClient.convertToType(data['my_number'], 'Number');
       }
       if (data.hasOwnProperty('my_string')) {
-        obj['my_string'] = 'String'.constructFromObject(data['my_string']);
+        obj['my_string'] = ApiClient.convertToType(data['my_string'], 'String');
       }
       if (data.hasOwnProperty('my_boolean')) {
-        obj['my_boolean'] = 'Boolean'.constructFromObject(data['my_boolean']);
+        obj['my_boolean'] = ApiClient.convertToType(data['my_boolean'], 'Boolean');
       }
     }
     return obj;
diff --git a/samples/client/petstore/javascript/src/model/OuterEnum.js b/samples/client/petstore/javascript/src/model/OuterEnum.js
index 9e1f532b44d0..0d7f9a4fd595 100644
--- a/samples/client/petstore/javascript/src/model/OuterEnum.js
+++ b/samples/client/petstore/javascript/src/model/OuterEnum.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript/src/model/Pet.js b/samples/client/petstore/javascript/src/model/Pet.js
index 55997490b789..69d47d25aef9 100644
--- a/samples/client/petstore/javascript/src/model/Pet.js
+++ b/samples/client/petstore/javascript/src/model/Pet.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript/src/model/ReadOnlyFirst.js b/samples/client/petstore/javascript/src/model/ReadOnlyFirst.js
index 1b0ae1104cc6..4e2f573958ea 100644
--- a/samples/client/petstore/javascript/src/model/ReadOnlyFirst.js
+++ b/samples/client/petstore/javascript/src/model/ReadOnlyFirst.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript/src/model/SpecialModelName.js b/samples/client/petstore/javascript/src/model/SpecialModelName.js
index 22464bbe7a25..5bea0b84fcf7 100644
--- a/samples/client/petstore/javascript/src/model/SpecialModelName.js
+++ b/samples/client/petstore/javascript/src/model/SpecialModelName.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript/src/model/StringBooleanMap.js b/samples/client/petstore/javascript/src/model/StringBooleanMap.js
new file mode 100644
index 000000000000..d07c0fc99ea7
--- /dev/null
+++ b/samples/client/petstore/javascript/src/model/StringBooleanMap.js
@@ -0,0 +1,76 @@
+/**
+ * OpenAPI Petstore
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * OpenAPI spec version: 1.0.0
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ *
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
+ *
+ * Do not edit the class manually.
+ *
+ */
+
+(function(root, factory) {
+  if (typeof define === 'function' && define.amd) {
+    // AMD. Register as an anonymous module.
+    define(['ApiClient'], factory);
+  } else if (typeof module === 'object' && module.exports) {
+    // CommonJS-like environments that support module.exports, like Node.
+    module.exports = factory(require('../ApiClient'));
+  } else {
+    // Browser globals (root is window)
+    if (!root.OpenApiPetstore) {
+      root.OpenApiPetstore = {};
+    }
+    root.OpenApiPetstore.StringBooleanMap = factory(root.OpenApiPetstore.ApiClient);
+  }
+}(this, function(ApiClient) {
+  'use strict';
+
+
+
+
+  /**
+   * The StringBooleanMap model module.
+   * @module model/StringBooleanMap
+   * @version 1.0.0
+   */
+
+  /**
+   * Constructs a new StringBooleanMap.
+   * @alias module:model/StringBooleanMap
+   * @class
+   * @extends Object
+   */
+  var exports = function() {
+    var _this = this;
+
+    return _this;
+  };
+
+  /**
+   * Constructs a StringBooleanMap from a plain JavaScript object, optionally creating a new instance.
+   * Copies all relevant properties from data to obj if supplied or a new instance if not.
+   * @param {Object} data The plain JavaScript object bearing properties of interest.
+   * @param {module:model/StringBooleanMap} obj Optional instance to populate.
+   * @return {module:model/StringBooleanMap} The populated StringBooleanMap instance.
+   */
+  exports.constructFromObject = function(data, obj) {
+    if (data) {
+      obj = obj || new exports();
+      ApiClient.constructFromObject(data, obj, 'Boolean');
+
+    }
+    return obj;
+  }
+
+
+
+
+  return exports;
+}));
+
+
diff --git a/samples/client/petstore/javascript/src/model/Tag.js b/samples/client/petstore/javascript/src/model/Tag.js
index 9e4f88b0872e..09299a4d0d61 100644
--- a/samples/client/petstore/javascript/src/model/Tag.js
+++ b/samples/client/petstore/javascript/src/model/Tag.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript/src/model/User.js b/samples/client/petstore/javascript/src/model/User.js
index 06d4e6e7ad0a..62a2a70c6802 100644
--- a/samples/client/petstore/javascript/src/model/User.js
+++ b/samples/client/petstore/javascript/src/model/User.js
@@ -7,7 +7,7 @@
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
  * https://openapi-generator.tech
  *
- * OpenAPI Generator version: 3.0.2-SNAPSHOT
+ * OpenAPI Generator version: 3.2.1-SNAPSHOT
  *
  * Do not edit the class manually.
  *
diff --git a/samples/client/petstore/javascript/test/model/File.spec.js b/samples/client/petstore/javascript/test/model/File.spec.js
new file mode 100644
index 000000000000..67f2956c3973
--- /dev/null
+++ b/samples/client/petstore/javascript/test/model/File.spec.js
@@ -0,0 +1,67 @@
+/**
+ * OpenAPI Petstore
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * OpenAPI spec version: 1.0.0
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ *
+ * OpenAPI Generator version: 3.2.0-SNAPSHOT
+ *
+ * Do not edit the class manually.
+ *
+ */
+
+(function(root, factory) {
+  if (typeof define === 'function' && define.amd) {
+    // AMD.
+    define(['expect.js', '../../src/index'], factory);
+  } else if (typeof module === 'object' && module.exports) {
+    // CommonJS-like environments that support module.exports, like Node.
+    factory(require('expect.js'), require('../../src/index'));
+  } else {
+    // Browser globals (root is window)
+    factory(root.expect, root.OpenApiPetstore);
+  }
+}(this, function(expect, OpenApiPetstore) {
+  'use strict';
+
+  var instance;
+
+  beforeEach(function() {
+    instance = new OpenApiPetstore.File();
+  });
+
+  var getProperty = function(object, getter, property) {
+    // Use getter method if present; otherwise, get the property directly.
+    if (typeof object[getter] === 'function')
+      return object[getter]();
+    else
+      return object[property];
+  }
+
+  var setProperty = function(object, setter, property, value) {
+    // Use setter method if present; otherwise, set the property directly.
+    if (typeof object[setter] === 'function')
+      object[setter](value);
+    else
+      object[property] = value;
+  }
+
+  describe('File', function() {
+    it('should create an instance of File', function() {
+      // uncomment below and update the code to test File
+      //var instance = new OpenApiPetstore.File();
+      //expect(instance).to.be.a(OpenApiPetstore.File);
+    });
+
+    it('should have the property sourceURI (base name: "sourceURI")', function() {
+      // uncomment below and update the code to test the property sourceURI
+      //var instance = new OpenApiPetstore.File();
+      //expect(instance).to.be();
+    });
+
+  });
+
+}));
diff --git a/samples/client/petstore/javascript/test/model/FileSchemaTestClass.spec.js b/samples/client/petstore/javascript/test/model/FileSchemaTestClass.spec.js
new file mode 100644
index 000000000000..74f68c03ff6b
--- /dev/null
+++ b/samples/client/petstore/javascript/test/model/FileSchemaTestClass.spec.js
@@ -0,0 +1,73 @@
+/**
+ * OpenAPI Petstore
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * OpenAPI spec version: 1.0.0
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ *
+ * OpenAPI Generator version: 3.2.0-SNAPSHOT
+ *
+ * Do not edit the class manually.
+ *
+ */
+
+(function(root, factory) {
+  if (typeof define === 'function' && define.amd) {
+    // AMD.
+    define(['expect.js', '../../src/index'], factory);
+  } else if (typeof module === 'object' && module.exports) {
+    // CommonJS-like environments that support module.exports, like Node.
+    factory(require('expect.js'), require('../../src/index'));
+  } else {
+    // Browser globals (root is window)
+    factory(root.expect, root.OpenApiPetstore);
+  }
+}(this, function(expect, OpenApiPetstore) {
+  'use strict';
+
+  var instance;
+
+  beforeEach(function() {
+    instance = new OpenApiPetstore.FileSchemaTestClass();
+  });
+
+  var getProperty = function(object, getter, property) {
+    // Use getter method if present; otherwise, get the property directly.
+    if (typeof object[getter] === 'function')
+      return object[getter]();
+    else
+      return object[property];
+  }
+
+  var setProperty = function(object, setter, property, value) {
+    // Use setter method if present; otherwise, set the property directly.
+    if (typeof object[setter] === 'function')
+      object[setter](value);
+    else
+      object[property] = value;
+  }
+
+  describe('FileSchemaTestClass', function() {
+    it('should create an instance of FileSchemaTestClass', function() {
+      // uncomment below and update the code to test FileSchemaTestClass
+      //var instance = new OpenApiPetstore.FileSchemaTestClass();
+      //expect(instance).to.be.a(OpenApiPetstore.FileSchemaTestClass);
+    });
+
+    it('should have the property file (base name: "file")', function() {
+      // uncomment below and update the code to test the property file
+      //var instance = new OpenApiPetstore.FileSchemaTestClass();
+      //expect(instance).to.be();
+    });
+
+    it('should have the property files (base name: "files")', function() {
+      // uncomment below and update the code to test the property files
+      //var instance = new OpenApiPetstore.FileSchemaTestClass();
+      //expect(instance).to.be();
+    });
+
+  });
+
+}));
diff --git a/samples/client/petstore/javascript/test/model/StringBooleanMap.spec.js b/samples/client/petstore/javascript/test/model/StringBooleanMap.spec.js
new file mode 100644
index 000000000000..c14a469bcf5f
--- /dev/null
+++ b/samples/client/petstore/javascript/test/model/StringBooleanMap.spec.js
@@ -0,0 +1,61 @@
+/**
+ * OpenAPI Petstore
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * OpenAPI spec version: 1.0.0
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ *
+ * OpenAPI Generator version: 3.2.0-SNAPSHOT
+ *
+ * Do not edit the class manually.
+ *
+ */
+
+(function(root, factory) {
+  if (typeof define === 'function' && define.amd) {
+    // AMD.
+    define(['expect.js', '../../src/index'], factory);
+  } else if (typeof module === 'object' && module.exports) {
+    // CommonJS-like environments that support module.exports, like Node.
+    factory(require('expect.js'), require('../../src/index'));
+  } else {
+    // Browser globals (root is window)
+    factory(root.expect, root.OpenApiPetstore);
+  }
+}(this, function(expect, OpenApiPetstore) {
+  'use strict';
+
+  var instance;
+
+  beforeEach(function() {
+    instance = new OpenApiPetstore.StringBooleanMap();
+  });
+
+  var getProperty = function(object, getter, property) {
+    // Use getter method if present; otherwise, get the property directly.
+    if (typeof object[getter] === 'function')
+      return object[getter]();
+    else
+      return object[property];
+  }
+
+  var setProperty = function(object, setter, property, value) {
+    // Use setter method if present; otherwise, set the property directly.
+    if (typeof object[setter] === 'function')
+      object[setter](value);
+    else
+      object[property] = value;
+  }
+
+  describe('StringBooleanMap', function() {
+    it('should create an instance of StringBooleanMap', function() {
+      // uncomment below and update the code to test StringBooleanMap
+      //var instance = new OpenApiPetstore.StringBooleanMap();
+      //expect(instance).to.be.a(OpenApiPetstore.StringBooleanMap);
+    });
+
+  });
+
+}));

From ddb0920fede28a631bfb603579a879d1e6a6c363 Mon Sep 17 00:00:00 2001
From: William Cheng 
Date: Sat, 11 Aug 2018 11:34:20 +0800
Subject: [PATCH 12/27] Fix C# client enum issue (#774)

* fix csharp enum issue

* fix numeric enum value

* add docstring to exlain isDataTypeString

* fix docstring by adding return

* fix ToJson in hash model

* remove BaseValidate for map model

* restore csproj file
---
 .../openapitools/codegen/DefaultCodegen.java  |   8 +
 .../languages/AbstractCSharpCodegen.java      |   6 +
 .../main/resources/csharp/enumClass.mustache  |   9 +-
 .../main/resources/csharp/modelEnum.mustache  |  13 +-
 .../resources/csharp/modelGeneric.mustache    |   4 +-
 .../resources/csharp/modelInnerEnum.mustache  |  13 +-
 .../OpenAPIClient/.openapi-generator/VERSION  |   2 +-
 .../petstore/csharp/OpenAPIClient/README.md   |  11 +-
 .../OpenAPIClient/docs/AnotherFakeApi.md      |  16 +-
 .../csharp/OpenAPIClient/docs/FakeApi.md      |  64 +++++-
 .../csharp/OpenAPIClient/docs/File.md         |   9 +
 .../OpenAPIClient/docs/FileSchemaTestClass.md |  10 +
 .../csharp/OpenAPIClient/docs/MapTest.md      |   2 +
 .../csharp/OpenAPIClient/docs/PetApi.md       |  67 ++++++
 .../OpenAPIClient/docs/StringBooleanMap.md    |   8 +
 .../Model/FileSchemaTestClassTests.cs         |  88 +++++++
 .../Org.OpenAPITools.Test/Model/FileTests.cs  |  80 +++++++
 .../Model/StringBooleanMapTests.cs            |  72 ++++++
 .../Org.OpenAPITools/Api/AnotherFakeApi.cs    |  44 ++--
 .../src/Org.OpenAPITools/Api/FakeApi.cs       | 187 +++++++++++++++
 .../src/Org.OpenAPITools/Api/PetApi.cs        | 215 ++++++++++++++++++
 .../src/Org.OpenAPITools/Model/EnumArrays.cs  |   8 +-
 .../src/Org.OpenAPITools/Model/EnumClass.cs   |   6 +-
 .../src/Org.OpenAPITools/Model/EnumTest.cs    |  22 +-
 .../src/Org.OpenAPITools/Model/File.cs        | 125 ++++++++++
 .../Model/FileSchemaTestClass.cs              | 140 ++++++++++++
 .../src/Org.OpenAPITools/Model/MapTest.cs     |  38 +++-
 .../src/Org.OpenAPITools/Model/Order.cs       |   6 +-
 .../src/Org.OpenAPITools/Model/OuterEnum.cs   |   6 +-
 .../src/Org.OpenAPITools/Model/Pet.cs         |   6 +-
 .../Model/StringBooleanMap.cs                 | 110 +++++++++
 31 files changed, 1316 insertions(+), 79 deletions(-)
 create mode 100644 samples/client/petstore/csharp/OpenAPIClient/docs/File.md
 create mode 100644 samples/client/petstore/csharp/OpenAPIClient/docs/FileSchemaTestClass.md
 create mode 100644 samples/client/petstore/csharp/OpenAPIClient/docs/StringBooleanMap.md
 create mode 100644 samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/FileSchemaTestClassTests.cs
 create mode 100644 samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/FileTests.cs
 create mode 100644 samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/StringBooleanMapTests.cs
 create mode 100644 samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/File.cs
 create mode 100644 samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs
 create mode 100644 samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/StringBooleanMap.cs

diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java
index 0747ade52245..46790890a855 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java
@@ -4577,6 +4577,14 @@ public class DefaultCodegen implements CodegenConfig {
         }
     }
 
+    /**
+     * checks if the data should be classified as "string" in enum
+     * e.g. double in C# needs to be double-quoted (e.g. "2.8") by treating it as a string
+     * In the future, we may rename this function to "isEnumString"
+     *
+     * @param dataType data type
+     * @return true if it's a enum string
+     */
     public boolean isDataTypeString(String dataType) {
         return "String".equals(dataType);
     }
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java
index c56f2c9423c8..c5633e0acc2d 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java
@@ -961,4 +961,10 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co
     public String escapeUnsafeCharacters(String input) {
         return input.replace("*/", "*_/").replace("/*", "/_*").replace("--", "- -");
     }
+
+    @Override
+    public boolean isDataTypeString(String dataType) {
+        // also treat double/decimal/float as "string" in enum so that the values (e.g. 2.8) get double-quoted
+        return "String".equalsIgnoreCase(dataType) || "double?".equals(dataType) || "decimal?".equals(dataType) || "float?".equals(dataType);
+    }
 }
diff --git a/modules/openapi-generator/src/main/resources/csharp/enumClass.mustache b/modules/openapi-generator/src/main/resources/csharp/enumClass.mustache
index 015e7142dbc5..de8c602a14dc 100644
--- a/modules/openapi-generator/src/main/resources/csharp/enumClass.mustache
+++ b/modules/openapi-generator/src/main/resources/csharp/enumClass.mustache
@@ -7,11 +7,14 @@
         [JsonConverter(typeof(StringEnumConverter))]
         {{>visibility}} enum {{#datatypeWithEnum}}{{.}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}
         {
-            {{#allowableValues}}{{#enumVars}}
+            {{#allowableValues}}
+            {{#enumVars}}
             /// 
             /// Enum {{name}} for {{{value}}}
             /// 
             [EnumMember(Value = {{#isLong}}"{{/isLong}}{{#isInteger}}"{{/isInteger}}{{#isFloat}}"{{/isFloat}}{{#isDouble}}"{{/isDouble}}{{{value}}}{{#isLong}}"{{/isLong}}{{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isFloat}}"{{/isFloat}})]
-            {{name}}{{#isLong}} = {{{value}}}{{/isLong}}{{#isInteger}} = {{{value}}}{{/isInteger}}{{^isInteger}} = {{-index}}{{/isInteger}}{{^-last}},
-            {{/-last}}{{/enumVars}}{{/allowableValues}}
+            {{name}}{{#isLong}} = {{{value}}}{{/isLong}}{{#isInteger}} = {{{value}}}{{/isInteger}}{{^isInteger}} = {{-index}}{{/isInteger}}{{^-last}},{{/-last}}
+
+            {{/enumVars}}
+            {{/allowableValues}}
         }
diff --git a/modules/openapi-generator/src/main/resources/csharp/modelEnum.mustache b/modules/openapi-generator/src/main/resources/csharp/modelEnum.mustache
index a7cf4473385f..c1a70a37f2dd 100644
--- a/modules/openapi-generator/src/main/resources/csharp/modelEnum.mustache
+++ b/modules/openapi-generator/src/main/resources/csharp/modelEnum.mustache
@@ -9,11 +9,16 @@
     {{/isString}}{{/-first}}{{/enumVars}}{{/allowableValues}}
     {{>visibility}} enum {{#datatypeWithEnum}}{{.}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}{{#vendorExtensions.x-enum-byte}}: byte{{/vendorExtensions.x-enum-byte}}
     {
-        {{#allowableValues}}{{#enumVars}}
+        {{#allowableValues}}
+        {{#enumVars}}
         /// 
         /// Enum {{name}} for value: {{{value}}}
         /// 
-        {{#isString}}[EnumMember(Value = "{{{value}}}")]{{/isString}}
-        {{name}}{{^isString}} = {{{value}}}{{/isString}}{{#isString}} = {{-index}}{{/isString}}{{^-last}},
-        {{/-last}}{{/enumVars}}{{/allowableValues}}
+        {{#isString}}
+        [EnumMember(Value = "{{{value}}}")]
+        {{/isString}}
+        {{name}}{{^isString}} = {{{value}}}{{/isString}}{{#isString}} = {{-index}}{{/isString}}{{^-last}},{{/-last}}
+
+        {{/enumVars}}
+        {{/allowableValues}}
     }{{! NOTE: This model's enumVars is modified to look like CodegenProperty}}
diff --git a/modules/openapi-generator/src/main/resources/csharp/modelGeneric.mustache b/modules/openapi-generator/src/main/resources/csharp/modelGeneric.mustache
index 3659e7db0bba..89d35b73ec09 100644
--- a/modules/openapi-generator/src/main/resources/csharp/modelGeneric.mustache
+++ b/modules/openapi-generator/src/main/resources/csharp/modelGeneric.mustache
@@ -133,7 +133,7 @@ this.{{name}} = {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}};
         /// Returns the JSON string presentation of the object
         /// 
         /// JSON string presentation of the object
-        public {{#parent}}{{^isArrayModel}}override {{/isArrayModel}}{{/parent}}{{^parent}}virtual {{/parent}}string ToJson()
+        public {{#parent}}{{^isArrayModel}}{{^isMapModel}}override {{/isMapModel}}{{/isArrayModel}}{{/parent}}{{^parent}}virtual {{/parent}}string ToJson()
         {
             return JsonConvert.SerializeObject(this, Formatting.Indented);
         }
@@ -247,7 +247,9 @@ this.{{name}} = {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}};
 {{/discriminator}}
             {{#parent}}
             {{^isArrayModel}}
+            {{^isMapModel}}
             foreach(var x in BaseValidate(validationContext)) yield return x;
+            {{/isMapModel}}
             {{/isArrayModel}}
             {{/parent}}
             {{#vars}}
diff --git a/modules/openapi-generator/src/main/resources/csharp/modelInnerEnum.mustache b/modules/openapi-generator/src/main/resources/csharp/modelInnerEnum.mustache
index bede8a16b5e9..d9e96dccdb3c 100644
--- a/modules/openapi-generator/src/main/resources/csharp/modelInnerEnum.mustache
+++ b/modules/openapi-generator/src/main/resources/csharp/modelInnerEnum.mustache
@@ -10,12 +10,17 @@
         {{/isString}}
         {{>visibility}} enum {{#datatypeWithEnum}}{{.}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}{{#vendorExtensions.x-enum-byte}}: byte{{/vendorExtensions.x-enum-byte}}
         {
-            {{#allowableValues}}{{#enumVars}}
+            {{#allowableValues}}
+            {{#enumVars}}
             /// 
             /// Enum {{name}} for value: {{{value}}}
             /// 
-            {{#isString}}[EnumMember(Value = "{{{value}}}")]{{/isString}}
-            {{name}}{{^isString}} = {{{value}}}{{/isString}}{{#isString}} = {{-index}}{{/isString}}{{^-last}},
-            {{/-last}}{{/enumVars}}{{/allowableValues}}
+            {{#isString}}
+            [EnumMember(Value = "{{{value}}}")]
+            {{/isString}}
+            {{name}}{{^isString}} = {{{value}}}{{/isString}}{{#isString}} = {{-index}}{{/isString}}{{^-last}},{{/-last}}
+
+            {{/enumVars}}
+            {{/allowableValues}}
         }
         {{/isContainer}}
diff --git a/samples/client/petstore/csharp/OpenAPIClient/.openapi-generator/VERSION b/samples/client/petstore/csharp/OpenAPIClient/.openapi-generator/VERSION
index 096bf47efe31..14900cee60e8 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/.openapi-generator/VERSION
+++ b/samples/client/petstore/csharp/OpenAPIClient/.openapi-generator/VERSION
@@ -1 +1 @@
-3.0.0-SNAPSHOT
\ No newline at end of file
+3.2.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/csharp/OpenAPIClient/README.md b/samples/client/petstore/csharp/OpenAPIClient/README.md
index 441abc408817..a2b8a9b17a0f 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/README.md
+++ b/samples/client/petstore/csharp/OpenAPIClient/README.md
@@ -76,12 +76,12 @@ namespace Example
             try
             {
                 // To test special tags
-                ModelClient result = apiInstance.TestSpecialTags(modelClient);
+                ModelClient result = apiInstance.Call123TestSpecialTags(modelClient);
                 Debug.WriteLine(result);
             }
             catch (Exception e)
             {
-                Debug.Print("Exception when calling AnotherFakeApi.TestSpecialTags: " + e.Message );
+                Debug.Print("Exception when calling AnotherFakeApi.Call123TestSpecialTags: " + e.Message );
             }
 
         }
@@ -96,11 +96,12 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
 
 Class | Method | HTTP request | Description
 ------------ | ------------- | ------------- | -------------
-*AnotherFakeApi* | [**TestSpecialTags**](docs/AnotherFakeApi.md#testspecialtags) | **PATCH** /another-fake/dummy | To test special tags
+*AnotherFakeApi* | [**Call123TestSpecialTags**](docs/AnotherFakeApi.md#call123testspecialtags) | **PATCH** /another-fake/dummy | To test special tags
 *FakeApi* | [**FakeOuterBooleanSerialize**](docs/FakeApi.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean | 
 *FakeApi* | [**FakeOuterCompositeSerialize**](docs/FakeApi.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite | 
 *FakeApi* | [**FakeOuterNumberSerialize**](docs/FakeApi.md#fakeouternumberserialize) | **POST** /fake/outer/number | 
 *FakeApi* | [**FakeOuterStringSerialize**](docs/FakeApi.md#fakeouterstringserialize) | **POST** /fake/outer/string | 
+*FakeApi* | [**TestBodyWithFileSchema**](docs/FakeApi.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | 
 *FakeApi* | [**TestBodyWithQueryParams**](docs/FakeApi.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | 
 *FakeApi* | [**TestClientModel**](docs/FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model
 *FakeApi* | [**TestEndpointParameters**](docs/FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 
@@ -116,6 +117,7 @@ Class | Method | HTTP request | Description
 *PetApi* | [**UpdatePet**](docs/PetApi.md#updatepet) | **PUT** /pet | Update an existing pet
 *PetApi* | [**UpdatePetWithForm**](docs/PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data
 *PetApi* | [**UploadFile**](docs/PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image
+*PetApi* | [**UploadFileWithRequiredFile**](docs/PetApi.md#uploadfilewithrequiredfile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required)
 *StoreApi* | [**DeleteOrder**](docs/StoreApi.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID
 *StoreApi* | [**GetInventory**](docs/StoreApi.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status
 *StoreApi* | [**GetOrderById**](docs/StoreApi.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID
@@ -148,6 +150,8 @@ Class | Method | HTTP request | Description
  - [Model.EnumArrays](docs/EnumArrays.md)
  - [Model.EnumClass](docs/EnumClass.md)
  - [Model.EnumTest](docs/EnumTest.md)
+ - [Model.File](docs/File.md)
+ - [Model.FileSchemaTestClass](docs/FileSchemaTestClass.md)
  - [Model.FormatTest](docs/FormatTest.md)
  - [Model.HasOnlyReadOnly](docs/HasOnlyReadOnly.md)
  - [Model.List](docs/List.md)
@@ -164,6 +168,7 @@ Class | Method | HTTP request | Description
  - [Model.ReadOnlyFirst](docs/ReadOnlyFirst.md)
  - [Model.Return](docs/Return.md)
  - [Model.SpecialModelName](docs/SpecialModelName.md)
+ - [Model.StringBooleanMap](docs/StringBooleanMap.md)
  - [Model.Tag](docs/Tag.md)
  - [Model.User](docs/User.md)
 
diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/AnotherFakeApi.md b/samples/client/petstore/csharp/OpenAPIClient/docs/AnotherFakeApi.md
index 2dca444f2768..81cc3106d64f 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/docs/AnotherFakeApi.md
+++ b/samples/client/petstore/csharp/OpenAPIClient/docs/AnotherFakeApi.md
@@ -4,16 +4,16 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
 
 Method | HTTP request | Description
 ------------- | ------------- | -------------
-[**TestSpecialTags**](AnotherFakeApi.md#testspecialtags) | **PATCH** /another-fake/dummy | To test special tags
+[**Call123TestSpecialTags**](AnotherFakeApi.md#call123testspecialtags) | **PATCH** /another-fake/dummy | To test special tags
 
 
-
-# **TestSpecialTags**
-> ModelClient TestSpecialTags (ModelClient modelClient)
+
+# **Call123TestSpecialTags**
+> ModelClient Call123TestSpecialTags (ModelClient modelClient)
 
 To test special tags
 
-To test special tags
+To test special tags and operation ID starting with number
 
 ### Example
 ```csharp
@@ -25,7 +25,7 @@ using Org.OpenAPITools.Model;
 
 namespace Example
 {
-    public class TestSpecialTagsExample
+    public class Call123TestSpecialTagsExample
     {
         public void main()
         {
@@ -35,12 +35,12 @@ namespace Example
             try
             {
                 // To test special tags
-                ModelClient result = apiInstance.TestSpecialTags(modelClient);
+                ModelClient result = apiInstance.Call123TestSpecialTags(modelClient);
                 Debug.WriteLine(result);
             }
             catch (Exception e)
             {
-                Debug.Print("Exception when calling AnotherFakeApi.TestSpecialTags: " + e.Message );
+                Debug.Print("Exception when calling AnotherFakeApi.Call123TestSpecialTags: " + e.Message );
             }
         }
     }
diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/FakeApi.md b/samples/client/petstore/csharp/OpenAPIClient/docs/FakeApi.md
index 2a4fb6094ae0..9c91addfad03 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/docs/FakeApi.md
+++ b/samples/client/petstore/csharp/OpenAPIClient/docs/FakeApi.md
@@ -8,6 +8,7 @@ Method | HTTP request | Description
 [**FakeOuterCompositeSerialize**](FakeApi.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite | 
 [**FakeOuterNumberSerialize**](FakeApi.md#fakeouternumberserialize) | **POST** /fake/outer/number | 
 [**FakeOuterStringSerialize**](FakeApi.md#fakeouterstringserialize) | **POST** /fake/outer/string | 
+[**TestBodyWithFileSchema**](FakeApi.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | 
 [**TestBodyWithQueryParams**](FakeApi.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | 
 [**TestClientModel**](FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model
 [**TestEndpointParameters**](FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 
@@ -256,6 +257,65 @@ No authorization required
 
 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
 
+
+# **TestBodyWithFileSchema**
+> void TestBodyWithFileSchema (FileSchemaTestClass fileSchemaTestClass)
+
+
+
+For this test, the body for this request much reference a schema named `File`.
+
+### Example
+```csharp
+using System;
+using System.Diagnostics;
+using Org.OpenAPITools.Api;
+using Org.OpenAPITools.Client;
+using Org.OpenAPITools.Model;
+
+namespace Example
+{
+    public class TestBodyWithFileSchemaExample
+    {
+        public void main()
+        {
+            var apiInstance = new FakeApi();
+            var fileSchemaTestClass = new FileSchemaTestClass(); // FileSchemaTestClass | 
+
+            try
+            {
+                apiInstance.TestBodyWithFileSchema(fileSchemaTestClass);
+            }
+            catch (Exception e)
+            {
+                Debug.Print("Exception when calling FakeApi.TestBodyWithFileSchema: " + e.Message );
+            }
+        }
+    }
+}
+```
+
+### Parameters
+
+Name | Type | Description  | Notes
+------------- | ------------- | ------------- | -------------
+ **fileSchemaTestClass** | [**FileSchemaTestClass**](FileSchemaTestClass.md)|  | 
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: Not defined
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
 
 # **TestBodyWithQueryParams**
 > void TestBodyWithQueryParams (string query, User user)
@@ -495,7 +555,7 @@ namespace Example
             var enumQueryString = enumQueryString_example;  // string | Query parameter enum test (string) (optional)  (default to -efg)
             var enumQueryInteger = 56;  // int? | Query parameter enum test (double) (optional) 
             var enumQueryDouble = 1.2;  // double? | Query parameter enum test (double) (optional) 
-            var enumFormStringArray = enumFormStringArray_example;  // List | Form parameter enum test (string array) (optional)  (default to $)
+            var enumFormStringArray = new List(); // List | Form parameter enum test (string array) (optional)  (default to $)
             var enumFormString = enumFormString_example;  // string | Form parameter enum test (string) (optional)  (default to -efg)
 
             try
@@ -522,7 +582,7 @@ Name | Type | Description  | Notes
  **enumQueryString** | **string**| Query parameter enum test (string) | [optional] [default to -efg]
  **enumQueryInteger** | **int?**| Query parameter enum test (double) | [optional] 
  **enumQueryDouble** | **double?**| Query parameter enum test (double) | [optional] 
- **enumFormStringArray** | **List<string>**| Form parameter enum test (string array) | [optional] [default to $]
+ **enumFormStringArray** | [**List<string>**](string.md)| Form parameter enum test (string array) | [optional] [default to $]
  **enumFormString** | **string**| Form parameter enum test (string) | [optional] [default to -efg]
 
 ### Return type
diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/File.md b/samples/client/petstore/csharp/OpenAPIClient/docs/File.md
new file mode 100644
index 000000000000..acf85a4c001a
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient/docs/File.md
@@ -0,0 +1,9 @@
+# Org.OpenAPITools.Model.File
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**SourceURI** | **string** | Test capitalization | [optional] 
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/FileSchemaTestClass.md b/samples/client/petstore/csharp/OpenAPIClient/docs/FileSchemaTestClass.md
new file mode 100644
index 000000000000..e0820fa4e650
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient/docs/FileSchemaTestClass.md
@@ -0,0 +1,10 @@
+# Org.OpenAPITools.Model.FileSchemaTestClass
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**File** | **System.IO.Stream** |  | [optional] 
+**Files** | **List<System.IO.Stream>** |  | [optional] 
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/MapTest.md b/samples/client/petstore/csharp/OpenAPIClient/docs/MapTest.md
index 2baba08d8552..ee62dbf135fa 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/docs/MapTest.md
+++ b/samples/client/petstore/csharp/OpenAPIClient/docs/MapTest.md
@@ -5,6 +5,8 @@ Name | Type | Description | Notes
 ------------ | ------------- | ------------- | -------------
 **MapMapOfString** | **Dictionary<string, Dictionary<string, string>>** |  | [optional] 
 **MapOfEnumString** | **Dictionary<string, string>** |  | [optional] 
+**DirectMap** | **Dictionary<string, bool?>** |  | [optional] 
+**IndirectMap** | [**StringBooleanMap**](StringBooleanMap.md) |  | [optional] 
 
 [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
 
diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/PetApi.md b/samples/client/petstore/csharp/OpenAPIClient/docs/PetApi.md
index 244ece53a318..dd23df9b3683 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/docs/PetApi.md
+++ b/samples/client/petstore/csharp/OpenAPIClient/docs/PetApi.md
@@ -12,6 +12,7 @@ Method | HTTP request | Description
 [**UpdatePet**](PetApi.md#updatepet) | **PUT** /pet | Update an existing pet
 [**UpdatePetWithForm**](PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data
 [**UploadFile**](PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image
+[**UploadFileWithRequiredFile**](PetApi.md#uploadfilewithrequiredfile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required)
 
 
 
@@ -524,3 +525,69 @@ Name | Type | Description  | Notes
 
 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
 
+
+# **UploadFileWithRequiredFile**
+> ApiResponse UploadFileWithRequiredFile (long? petId, System.IO.Stream requiredFile, string additionalMetadata = null)
+
+uploads an image (required)
+
+### Example
+```csharp
+using System;
+using System.Diagnostics;
+using Org.OpenAPITools.Api;
+using Org.OpenAPITools.Client;
+using Org.OpenAPITools.Model;
+
+namespace Example
+{
+    public class UploadFileWithRequiredFileExample
+    {
+        public void main()
+        {
+            // Configure OAuth2 access token for authorization: petstore_auth
+            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
+
+            var apiInstance = new PetApi();
+            var petId = 789;  // long? | ID of pet to update
+            var requiredFile = BINARY_DATA_HERE;  // System.IO.Stream | file to upload
+            var additionalMetadata = additionalMetadata_example;  // string | Additional data to pass to server (optional) 
+
+            try
+            {
+                // uploads an image (required)
+                ApiResponse result = apiInstance.UploadFileWithRequiredFile(petId, requiredFile, additionalMetadata);
+                Debug.WriteLine(result);
+            }
+            catch (Exception e)
+            {
+                Debug.Print("Exception when calling PetApi.UploadFileWithRequiredFile: " + e.Message );
+            }
+        }
+    }
+}
+```
+
+### Parameters
+
+Name | Type | Description  | Notes
+------------- | ------------- | ------------- | -------------
+ **petId** | **long?**| ID of pet to update | 
+ **requiredFile** | **System.IO.Stream**| file to upload | 
+ **additionalMetadata** | **string**| Additional data to pass to server | [optional] 
+
+### Return type
+
+[**ApiResponse**](ApiResponse.md)
+
+### Authorization
+
+[petstore_auth](../README.md#petstore_auth)
+
+### HTTP request headers
+
+ - **Content-Type**: multipart/form-data
+ - **Accept**: application/json
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/StringBooleanMap.md b/samples/client/petstore/csharp/OpenAPIClient/docs/StringBooleanMap.md
new file mode 100644
index 000000000000..6e7a71368df7
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient/docs/StringBooleanMap.md
@@ -0,0 +1,8 @@
+# Org.OpenAPITools.Model.StringBooleanMap
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/FileSchemaTestClassTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/FileSchemaTestClassTests.cs
new file mode 100644
index 000000000000..bb47c43dc7a1
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/FileSchemaTestClassTests.cs
@@ -0,0 +1,88 @@
+/* 
+ * OpenAPI Petstore
+ *
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * OpenAPI spec version: 1.0.0
+ * 
+ * Generated by: https://github.com/openapitools/openapi-generator.git
+ */
+
+
+using NUnit.Framework;
+
+using System;
+using System.Linq;
+using System.IO;
+using System.Collections.Generic;
+using Org.OpenAPITools.Api;
+using Org.OpenAPITools.Model;
+using Org.OpenAPITools.Client;
+using System.Reflection;
+using Newtonsoft.Json;
+
+namespace Org.OpenAPITools.Test
+{
+    /// 
+    ///  Class for testing FileSchemaTestClass
+    /// 
+    /// 
+    /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
+    /// Please update the test case below to test the model.
+    /// 
+    [TestFixture]
+    public class FileSchemaTestClassTests
+    {
+        // TODO uncomment below to declare an instance variable for FileSchemaTestClass
+        //private FileSchemaTestClass instance;
+
+        /// 
+        /// Setup before each test
+        /// 
+        [SetUp]
+        public void Init()
+        {
+            // TODO uncomment below to create an instance of FileSchemaTestClass
+            //instance = new FileSchemaTestClass();
+        }
+
+        /// 
+        /// Clean up after each test
+        /// 
+        [TearDown]
+        public void Cleanup()
+        {
+
+        }
+
+        /// 
+        /// Test an instance of FileSchemaTestClass
+        /// 
+        [Test]
+        public void FileSchemaTestClassInstanceTest()
+        {
+            // TODO uncomment below to test "IsInstanceOfType" FileSchemaTestClass
+            //Assert.IsInstanceOfType (instance, "variable 'instance' is a FileSchemaTestClass");
+        }
+
+
+        /// 
+        /// Test the property 'File'
+        /// 
+        [Test]
+        public void FileTest()
+        {
+            // TODO unit test for the property 'File'
+        }
+        /// 
+        /// Test the property 'Files'
+        /// 
+        [Test]
+        public void FilesTest()
+        {
+            // TODO unit test for the property 'Files'
+        }
+
+    }
+
+}
diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/FileTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/FileTests.cs
new file mode 100644
index 000000000000..f1cf54c22e4d
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/FileTests.cs
@@ -0,0 +1,80 @@
+/* 
+ * OpenAPI Petstore
+ *
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * OpenAPI spec version: 1.0.0
+ * 
+ * Generated by: https://github.com/openapitools/openapi-generator.git
+ */
+
+
+using NUnit.Framework;
+
+using System;
+using System.Linq;
+using System.IO;
+using System.Collections.Generic;
+using Org.OpenAPITools.Api;
+using Org.OpenAPITools.Model;
+using Org.OpenAPITools.Client;
+using System.Reflection;
+using Newtonsoft.Json;
+
+namespace Org.OpenAPITools.Test
+{
+    /// 
+    ///  Class for testing File
+    /// 
+    /// 
+    /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
+    /// Please update the test case below to test the model.
+    /// 
+    [TestFixture]
+    public class FileTests
+    {
+        // TODO uncomment below to declare an instance variable for File
+        //private File instance;
+
+        /// 
+        /// Setup before each test
+        /// 
+        [SetUp]
+        public void Init()
+        {
+            // TODO uncomment below to create an instance of File
+            //instance = new File();
+        }
+
+        /// 
+        /// Clean up after each test
+        /// 
+        [TearDown]
+        public void Cleanup()
+        {
+
+        }
+
+        /// 
+        /// Test an instance of File
+        /// 
+        [Test]
+        public void FileInstanceTest()
+        {
+            // TODO uncomment below to test "IsInstanceOfType" File
+            //Assert.IsInstanceOfType (instance, "variable 'instance' is a File");
+        }
+
+
+        /// 
+        /// Test the property 'SourceURI'
+        /// 
+        [Test]
+        public void SourceURITest()
+        {
+            // TODO unit test for the property 'SourceURI'
+        }
+
+    }
+
+}
diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/StringBooleanMapTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/StringBooleanMapTests.cs
new file mode 100644
index 000000000000..efc4cd907733
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/StringBooleanMapTests.cs
@@ -0,0 +1,72 @@
+/* 
+ * OpenAPI Petstore
+ *
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * OpenAPI spec version: 1.0.0
+ * 
+ * Generated by: https://github.com/openapitools/openapi-generator.git
+ */
+
+
+using NUnit.Framework;
+
+using System;
+using System.Linq;
+using System.IO;
+using System.Collections.Generic;
+using Org.OpenAPITools.Api;
+using Org.OpenAPITools.Model;
+using Org.OpenAPITools.Client;
+using System.Reflection;
+using Newtonsoft.Json;
+
+namespace Org.OpenAPITools.Test
+{
+    /// 
+    ///  Class for testing StringBooleanMap
+    /// 
+    /// 
+    /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
+    /// Please update the test case below to test the model.
+    /// 
+    [TestFixture]
+    public class StringBooleanMapTests
+    {
+        // TODO uncomment below to declare an instance variable for StringBooleanMap
+        //private StringBooleanMap instance;
+
+        /// 
+        /// Setup before each test
+        /// 
+        [SetUp]
+        public void Init()
+        {
+            // TODO uncomment below to create an instance of StringBooleanMap
+            //instance = new StringBooleanMap();
+        }
+
+        /// 
+        /// Clean up after each test
+        /// 
+        [TearDown]
+        public void Cleanup()
+        {
+
+        }
+
+        /// 
+        /// Test an instance of StringBooleanMap
+        /// 
+        [Test]
+        public void StringBooleanMapInstanceTest()
+        {
+            // TODO uncomment below to test "IsInstanceOfType" StringBooleanMap
+            //Assert.IsInstanceOfType (instance, "variable 'instance' is a StringBooleanMap");
+        }
+
+
+
+    }
+
+}
diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Api/AnotherFakeApi.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Api/AnotherFakeApi.cs
index a636d07b7219..aacccf92ca50 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Api/AnotherFakeApi.cs
+++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Api/AnotherFakeApi.cs
@@ -28,46 +28,46 @@ namespace Org.OpenAPITools.Api
         /// To test special tags
         /// 
         /// 
-        /// To test special tags
+        /// To test special tags and operation ID starting with number
         /// 
         /// Thrown when fails to make API call
         /// client model
         /// ModelClient
-        ModelClient TestSpecialTags (ModelClient modelClient);
+        ModelClient Call123TestSpecialTags (ModelClient modelClient);
 
         /// 
         /// To test special tags
         /// 
         /// 
-        /// To test special tags
+        /// To test special tags and operation ID starting with number
         /// 
         /// Thrown when fails to make API call
         /// client model
         /// ApiResponse of ModelClient
-        ApiResponse TestSpecialTagsWithHttpInfo (ModelClient modelClient);
+        ApiResponse Call123TestSpecialTagsWithHttpInfo (ModelClient modelClient);
         #endregion Synchronous Operations
         #region Asynchronous Operations
         /// 
         /// To test special tags
         /// 
         /// 
-        /// To test special tags
+        /// To test special tags and operation ID starting with number
         /// 
         /// Thrown when fails to make API call
         /// client model
         /// Task of ModelClient
-        System.Threading.Tasks.Task TestSpecialTagsAsync (ModelClient modelClient);
+        System.Threading.Tasks.Task Call123TestSpecialTagsAsync (ModelClient modelClient);
 
         /// 
         /// To test special tags
         /// 
         /// 
-        /// To test special tags
+        /// To test special tags and operation ID starting with number
         /// 
         /// Thrown when fails to make API call
         /// client model
         /// Task of ApiResponse (ModelClient)
-        System.Threading.Tasks.Task> TestSpecialTagsAsyncWithHttpInfo (ModelClient modelClient);
+        System.Threading.Tasks.Task> Call123TestSpecialTagsAsyncWithHttpInfo (ModelClient modelClient);
         #endregion Asynchronous Operations
     }
 
@@ -169,28 +169,28 @@ namespace Org.OpenAPITools.Api
         }
 
         /// 
-        /// To test special tags To test special tags
+        /// To test special tags To test special tags and operation ID starting with number
         /// 
         /// Thrown when fails to make API call
         /// client model
         /// ModelClient
-        public ModelClient TestSpecialTags (ModelClient modelClient)
+        public ModelClient Call123TestSpecialTags (ModelClient modelClient)
         {
-             ApiResponse localVarResponse = TestSpecialTagsWithHttpInfo(modelClient);
+             ApiResponse localVarResponse = Call123TestSpecialTagsWithHttpInfo(modelClient);
              return localVarResponse.Data;
         }
 
         /// 
-        /// To test special tags To test special tags
+        /// To test special tags To test special tags and operation ID starting with number
         /// 
         /// Thrown when fails to make API call
         /// client model
         /// ApiResponse of ModelClient
-        public ApiResponse< ModelClient > TestSpecialTagsWithHttpInfo (ModelClient modelClient)
+        public ApiResponse< ModelClient > Call123TestSpecialTagsWithHttpInfo (ModelClient modelClient)
         {
             // verify the required parameter 'modelClient' is set
             if (modelClient == null)
-                throw new ApiException(400, "Missing required parameter 'modelClient' when calling AnotherFakeApi->TestSpecialTags");
+                throw new ApiException(400, "Missing required parameter 'modelClient' when calling AnotherFakeApi->Call123TestSpecialTags");
 
             var localVarPath = "/another-fake/dummy";
             var localVarPathParams = new Dictionary();
@@ -233,7 +233,7 @@ namespace Org.OpenAPITools.Api
 
             if (ExceptionFactory != null)
             {
-                Exception exception = ExceptionFactory("TestSpecialTags", localVarResponse);
+                Exception exception = ExceptionFactory("Call123TestSpecialTags", localVarResponse);
                 if (exception != null) throw exception;
             }
 
@@ -243,29 +243,29 @@ namespace Org.OpenAPITools.Api
         }
 
         /// 
-        /// To test special tags To test special tags
+        /// To test special tags To test special tags and operation ID starting with number
         /// 
         /// Thrown when fails to make API call
         /// client model
         /// Task of ModelClient
-        public async System.Threading.Tasks.Task TestSpecialTagsAsync (ModelClient modelClient)
+        public async System.Threading.Tasks.Task Call123TestSpecialTagsAsync (ModelClient modelClient)
         {
-             ApiResponse localVarResponse = await TestSpecialTagsAsyncWithHttpInfo(modelClient);
+             ApiResponse localVarResponse = await Call123TestSpecialTagsAsyncWithHttpInfo(modelClient);
              return localVarResponse.Data;
 
         }
 
         /// 
-        /// To test special tags To test special tags
+        /// To test special tags To test special tags and operation ID starting with number
         /// 
         /// Thrown when fails to make API call
         /// client model
         /// Task of ApiResponse (ModelClient)
-        public async System.Threading.Tasks.Task> TestSpecialTagsAsyncWithHttpInfo (ModelClient modelClient)
+        public async System.Threading.Tasks.Task> Call123TestSpecialTagsAsyncWithHttpInfo (ModelClient modelClient)
         {
             // verify the required parameter 'modelClient' is set
             if (modelClient == null)
-                throw new ApiException(400, "Missing required parameter 'modelClient' when calling AnotherFakeApi->TestSpecialTags");
+                throw new ApiException(400, "Missing required parameter 'modelClient' when calling AnotherFakeApi->Call123TestSpecialTags");
 
             var localVarPath = "/another-fake/dummy";
             var localVarPathParams = new Dictionary();
@@ -308,7 +308,7 @@ namespace Org.OpenAPITools.Api
 
             if (ExceptionFactory != null)
             {
-                Exception exception = ExceptionFactory("TestSpecialTags", localVarResponse);
+                Exception exception = ExceptionFactory("Call123TestSpecialTags", localVarResponse);
                 if (exception != null) throw exception;
             }
 
diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Api/FakeApi.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Api/FakeApi.cs
index 8974ba425708..60e219ead9d0 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Api/FakeApi.cs
+++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Api/FakeApi.cs
@@ -112,6 +112,27 @@ namespace Org.OpenAPITools.Api
         /// 
         /// 
         /// 
+        /// For this test, the body for this request much reference a schema named `File`.
+        /// 
+        /// Thrown when fails to make API call
+        /// 
+        /// 
+        void TestBodyWithFileSchema (FileSchemaTestClass fileSchemaTestClass);
+
+        /// 
+        /// 
+        /// 
+        /// 
+        /// For this test, the body for this request much reference a schema named `File`.
+        /// 
+        /// Thrown when fails to make API call
+        /// 
+        /// ApiResponse of Object(void)
+        ApiResponse TestBodyWithFileSchemaWithHttpInfo (FileSchemaTestClass fileSchemaTestClass);
+        /// 
+        /// 
+        /// 
+        /// 
         /// 
         /// 
         /// Thrown when fails to make API call
@@ -368,6 +389,27 @@ namespace Org.OpenAPITools.Api
         /// 
         /// 
         /// 
+        /// For this test, the body for this request much reference a schema named `File`.
+        /// 
+        /// Thrown when fails to make API call
+        /// 
+        /// Task of void
+        System.Threading.Tasks.Task TestBodyWithFileSchemaAsync (FileSchemaTestClass fileSchemaTestClass);
+
+        /// 
+        /// 
+        /// 
+        /// 
+        /// For this test, the body for this request much reference a schema named `File`.
+        /// 
+        /// Thrown when fails to make API call
+        /// 
+        /// Task of ApiResponse
+        System.Threading.Tasks.Task> TestBodyWithFileSchemaAsyncWithHttpInfo (FileSchemaTestClass fileSchemaTestClass);
+        /// 
+        /// 
+        /// 
+        /// 
         /// 
         /// 
         /// Thrown when fails to make API call
@@ -1198,6 +1240,151 @@ namespace Org.OpenAPITools.Api
                 (string) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(string)));
         }
 
+        /// 
+        ///  For this test, the body for this request much reference a schema named `File`.
+        /// 
+        /// Thrown when fails to make API call
+        /// 
+        /// 
+        public void TestBodyWithFileSchema (FileSchemaTestClass fileSchemaTestClass)
+        {
+             TestBodyWithFileSchemaWithHttpInfo(fileSchemaTestClass);
+        }
+
+        /// 
+        ///  For this test, the body for this request much reference a schema named `File`.
+        /// 
+        /// Thrown when fails to make API call
+        /// 
+        /// ApiResponse of Object(void)
+        public ApiResponse TestBodyWithFileSchemaWithHttpInfo (FileSchemaTestClass fileSchemaTestClass)
+        {
+            // verify the required parameter 'fileSchemaTestClass' is set
+            if (fileSchemaTestClass == null)
+                throw new ApiException(400, "Missing required parameter 'fileSchemaTestClass' when calling FakeApi->TestBodyWithFileSchema");
+
+            var localVarPath = "/fake/body-with-file-schema";
+            var localVarPathParams = new Dictionary();
+            var localVarQueryParams = new List>();
+            var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader);
+            var localVarFormParams = new Dictionary();
+            var localVarFileParams = new Dictionary();
+            Object localVarPostBody = null;
+
+            // to determine the Content-Type header
+            String[] localVarHttpContentTypes = new String[] {
+                "application/json"
+            };
+            String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
+
+            // to determine the Accept header
+            String[] localVarHttpHeaderAccepts = new String[] {
+            };
+            String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
+            if (localVarHttpHeaderAccept != null)
+                localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
+
+            if (fileSchemaTestClass != null && fileSchemaTestClass.GetType() != typeof(byte[]))
+            {
+                localVarPostBody = this.Configuration.ApiClient.Serialize(fileSchemaTestClass); // http body (model) parameter
+            }
+            else
+            {
+                localVarPostBody = fileSchemaTestClass; // byte array
+            }
+
+
+            // make the HTTP request
+            IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath,
+                Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
+                localVarPathParams, localVarHttpContentType);
+
+            int localVarStatusCode = (int) localVarResponse.StatusCode;
+
+            if (ExceptionFactory != null)
+            {
+                Exception exception = ExceptionFactory("TestBodyWithFileSchema", localVarResponse);
+                if (exception != null) throw exception;
+            }
+
+            return new ApiResponse(localVarStatusCode,
+                localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
+                null);
+        }
+
+        /// 
+        ///  For this test, the body for this request much reference a schema named `File`.
+        /// 
+        /// Thrown when fails to make API call
+        /// 
+        /// Task of void
+        public async System.Threading.Tasks.Task TestBodyWithFileSchemaAsync (FileSchemaTestClass fileSchemaTestClass)
+        {
+             await TestBodyWithFileSchemaAsyncWithHttpInfo(fileSchemaTestClass);
+
+        }
+
+        /// 
+        ///  For this test, the body for this request much reference a schema named `File`.
+        /// 
+        /// Thrown when fails to make API call
+        /// 
+        /// Task of ApiResponse
+        public async System.Threading.Tasks.Task> TestBodyWithFileSchemaAsyncWithHttpInfo (FileSchemaTestClass fileSchemaTestClass)
+        {
+            // verify the required parameter 'fileSchemaTestClass' is set
+            if (fileSchemaTestClass == null)
+                throw new ApiException(400, "Missing required parameter 'fileSchemaTestClass' when calling FakeApi->TestBodyWithFileSchema");
+
+            var localVarPath = "/fake/body-with-file-schema";
+            var localVarPathParams = new Dictionary();
+            var localVarQueryParams = new List>();
+            var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader);
+            var localVarFormParams = new Dictionary();
+            var localVarFileParams = new Dictionary();
+            Object localVarPostBody = null;
+
+            // to determine the Content-Type header
+            String[] localVarHttpContentTypes = new String[] {
+                "application/json"
+            };
+            String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
+
+            // to determine the Accept header
+            String[] localVarHttpHeaderAccepts = new String[] {
+            };
+            String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
+            if (localVarHttpHeaderAccept != null)
+                localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
+
+            if (fileSchemaTestClass != null && fileSchemaTestClass.GetType() != typeof(byte[]))
+            {
+                localVarPostBody = this.Configuration.ApiClient.Serialize(fileSchemaTestClass); // http body (model) parameter
+            }
+            else
+            {
+                localVarPostBody = fileSchemaTestClass; // byte array
+            }
+
+
+            // make the HTTP request
+            IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath,
+                Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
+                localVarPathParams, localVarHttpContentType);
+
+            int localVarStatusCode = (int) localVarResponse.StatusCode;
+
+            if (ExceptionFactory != null)
+            {
+                Exception exception = ExceptionFactory("TestBodyWithFileSchema", localVarResponse);
+                if (exception != null) throw exception;
+            }
+
+            return new ApiResponse(localVarStatusCode,
+                localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
+                null);
+        }
+
         /// 
         ///  
         /// 
diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Api/PetApi.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Api/PetApi.cs
index 9bfb712fd455..2fb6528b32e2 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Api/PetApi.cs
+++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Api/PetApi.cs
@@ -202,6 +202,31 @@ namespace Org.OpenAPITools.Api
         /// file to upload (optional)
         /// ApiResponse of ApiResponse
         ApiResponse UploadFileWithHttpInfo (long? petId, string additionalMetadata = null, System.IO.Stream file = null);
+        /// 
+        /// uploads an image (required)
+        /// 
+        /// 
+        /// 
+        /// 
+        /// Thrown when fails to make API call
+        /// ID of pet to update
+        /// file to upload
+        /// Additional data to pass to server (optional)
+        /// ApiResponse
+        ApiResponse UploadFileWithRequiredFile (long? petId, System.IO.Stream requiredFile, string additionalMetadata = null);
+
+        /// 
+        /// uploads an image (required)
+        /// 
+        /// 
+        /// 
+        /// 
+        /// Thrown when fails to make API call
+        /// ID of pet to update
+        /// file to upload
+        /// Additional data to pass to server (optional)
+        /// ApiResponse of ApiResponse
+        ApiResponse UploadFileWithRequiredFileWithHttpInfo (long? petId, System.IO.Stream requiredFile, string additionalMetadata = null);
         #endregion Synchronous Operations
         #region Asynchronous Operations
         /// 
@@ -382,6 +407,31 @@ namespace Org.OpenAPITools.Api
         /// file to upload (optional)
         /// Task of ApiResponse (ApiResponse)
         System.Threading.Tasks.Task> UploadFileAsyncWithHttpInfo (long? petId, string additionalMetadata = null, System.IO.Stream file = null);
+        /// 
+        /// uploads an image (required)
+        /// 
+        /// 
+        /// 
+        /// 
+        /// Thrown when fails to make API call
+        /// ID of pet to update
+        /// file to upload
+        /// Additional data to pass to server (optional)
+        /// Task of ApiResponse
+        System.Threading.Tasks.Task UploadFileWithRequiredFileAsync (long? petId, System.IO.Stream requiredFile, string additionalMetadata = null);
+
+        /// 
+        /// uploads an image (required)
+        /// 
+        /// 
+        /// 
+        /// 
+        /// Thrown when fails to make API call
+        /// ID of pet to update
+        /// file to upload
+        /// Additional data to pass to server (optional)
+        /// Task of ApiResponse (ApiResponse)
+        System.Threading.Tasks.Task> UploadFileWithRequiredFileAsyncWithHttpInfo (long? petId, System.IO.Stream requiredFile, string additionalMetadata = null);
         #endregion Asynchronous Operations
     }
 
@@ -1700,5 +1750,170 @@ namespace Org.OpenAPITools.Api
                 (ApiResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ApiResponse)));
         }
 
+        /// 
+        /// uploads an image (required) 
+        /// 
+        /// Thrown when fails to make API call
+        /// ID of pet to update
+        /// file to upload
+        /// Additional data to pass to server (optional)
+        /// ApiResponse
+        public ApiResponse UploadFileWithRequiredFile (long? petId, System.IO.Stream requiredFile, string additionalMetadata = null)
+        {
+             ApiResponse localVarResponse = UploadFileWithRequiredFileWithHttpInfo(petId, requiredFile, additionalMetadata);
+             return localVarResponse.Data;
+        }
+
+        /// 
+        /// uploads an image (required) 
+        /// 
+        /// Thrown when fails to make API call
+        /// ID of pet to update
+        /// file to upload
+        /// Additional data to pass to server (optional)
+        /// ApiResponse of ApiResponse
+        public ApiResponse< ApiResponse > UploadFileWithRequiredFileWithHttpInfo (long? petId, System.IO.Stream requiredFile, string additionalMetadata = null)
+        {
+            // verify the required parameter 'petId' is set
+            if (petId == null)
+                throw new ApiException(400, "Missing required parameter 'petId' when calling PetApi->UploadFileWithRequiredFile");
+            // verify the required parameter 'requiredFile' is set
+            if (requiredFile == null)
+                throw new ApiException(400, "Missing required parameter 'requiredFile' when calling PetApi->UploadFileWithRequiredFile");
+
+            var localVarPath = "/fake/{petId}/uploadImageWithRequiredFile";
+            var localVarPathParams = new Dictionary();
+            var localVarQueryParams = new List>();
+            var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader);
+            var localVarFormParams = new Dictionary();
+            var localVarFileParams = new Dictionary();
+            Object localVarPostBody = null;
+
+            // to determine the Content-Type header
+            String[] localVarHttpContentTypes = new String[] {
+                "multipart/form-data"
+            };
+            String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
+
+            // to determine the Accept header
+            String[] localVarHttpHeaderAccepts = new String[] {
+                "application/json"
+            };
+            String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
+            if (localVarHttpHeaderAccept != null)
+                localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
+
+            if (petId != null) localVarPathParams.Add("petId", this.Configuration.ApiClient.ParameterToString(petId)); // path parameter
+            if (additionalMetadata != null) localVarFormParams.Add("additionalMetadata", this.Configuration.ApiClient.ParameterToString(additionalMetadata)); // form parameter
+            if (requiredFile != null) localVarFileParams.Add("requiredFile", this.Configuration.ApiClient.ParameterToFile("requiredFile", requiredFile));
+
+            // authentication (petstore_auth) required
+            // oauth required
+            if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
+            {
+                localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken;
+            }
+
+            // make the HTTP request
+            IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath,
+                Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
+                localVarPathParams, localVarHttpContentType);
+
+            int localVarStatusCode = (int) localVarResponse.StatusCode;
+
+            if (ExceptionFactory != null)
+            {
+                Exception exception = ExceptionFactory("UploadFileWithRequiredFile", localVarResponse);
+                if (exception != null) throw exception;
+            }
+
+            return new ApiResponse(localVarStatusCode,
+                localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
+                (ApiResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ApiResponse)));
+        }
+
+        /// 
+        /// uploads an image (required) 
+        /// 
+        /// Thrown when fails to make API call
+        /// ID of pet to update
+        /// file to upload
+        /// Additional data to pass to server (optional)
+        /// Task of ApiResponse
+        public async System.Threading.Tasks.Task UploadFileWithRequiredFileAsync (long? petId, System.IO.Stream requiredFile, string additionalMetadata = null)
+        {
+             ApiResponse localVarResponse = await UploadFileWithRequiredFileAsyncWithHttpInfo(petId, requiredFile, additionalMetadata);
+             return localVarResponse.Data;
+
+        }
+
+        /// 
+        /// uploads an image (required) 
+        /// 
+        /// Thrown when fails to make API call
+        /// ID of pet to update
+        /// file to upload
+        /// Additional data to pass to server (optional)
+        /// Task of ApiResponse (ApiResponse)
+        public async System.Threading.Tasks.Task> UploadFileWithRequiredFileAsyncWithHttpInfo (long? petId, System.IO.Stream requiredFile, string additionalMetadata = null)
+        {
+            // verify the required parameter 'petId' is set
+            if (petId == null)
+                throw new ApiException(400, "Missing required parameter 'petId' when calling PetApi->UploadFileWithRequiredFile");
+            // verify the required parameter 'requiredFile' is set
+            if (requiredFile == null)
+                throw new ApiException(400, "Missing required parameter 'requiredFile' when calling PetApi->UploadFileWithRequiredFile");
+
+            var localVarPath = "/fake/{petId}/uploadImageWithRequiredFile";
+            var localVarPathParams = new Dictionary();
+            var localVarQueryParams = new List>();
+            var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader);
+            var localVarFormParams = new Dictionary();
+            var localVarFileParams = new Dictionary();
+            Object localVarPostBody = null;
+
+            // to determine the Content-Type header
+            String[] localVarHttpContentTypes = new String[] {
+                "multipart/form-data"
+            };
+            String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
+
+            // to determine the Accept header
+            String[] localVarHttpHeaderAccepts = new String[] {
+                "application/json"
+            };
+            String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
+            if (localVarHttpHeaderAccept != null)
+                localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
+
+            if (petId != null) localVarPathParams.Add("petId", this.Configuration.ApiClient.ParameterToString(petId)); // path parameter
+            if (additionalMetadata != null) localVarFormParams.Add("additionalMetadata", this.Configuration.ApiClient.ParameterToString(additionalMetadata)); // form parameter
+            if (requiredFile != null) localVarFileParams.Add("requiredFile", this.Configuration.ApiClient.ParameterToFile("requiredFile", requiredFile));
+
+            // authentication (petstore_auth) required
+            // oauth required
+            if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
+            {
+                localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken;
+            }
+
+            // make the HTTP request
+            IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath,
+                Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
+                localVarPathParams, localVarHttpContentType);
+
+            int localVarStatusCode = (int) localVarResponse.StatusCode;
+
+            if (ExceptionFactory != null)
+            {
+                Exception exception = ExceptionFactory("UploadFileWithRequiredFile", localVarResponse);
+                if (exception != null) throw exception;
+            }
+
+            return new ApiResponse(localVarStatusCode,
+                localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
+                (ApiResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ApiResponse)));
+        }
+
     }
 }
diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/EnumArrays.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/EnumArrays.cs
index ba25e7775635..567a207068c2 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/EnumArrays.cs
+++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/EnumArrays.cs
@@ -36,18 +36,18 @@ namespace Org.OpenAPITools.Model
         [JsonConverter(typeof(StringEnumConverter))]
         public enum JustSymbolEnum
         {
-            
             /// 
             /// Enum GreaterThanOrEqualTo for value: >=
             /// 
             [EnumMember(Value = ">=")]
             GreaterThanOrEqualTo = 1,
-            
+
             /// 
             /// Enum Dollar for value: $
             /// 
             [EnumMember(Value = "$")]
             Dollar = 2
+
         }
 
         /// 
@@ -61,18 +61,18 @@ namespace Org.OpenAPITools.Model
         [JsonConverter(typeof(StringEnumConverter))]
         public enum ArrayEnumEnum
         {
-            
             /// 
             /// Enum Fish for value: fish
             /// 
             [EnumMember(Value = "fish")]
             Fish = 1,
-            
+
             /// 
             /// Enum Crab for value: crab
             /// 
             [EnumMember(Value = "crab")]
             Crab = 2
+
         }
 
 
diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/EnumClass.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/EnumClass.cs
index 3da1bee1360c..33643e475f51 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/EnumClass.cs
+++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/EnumClass.cs
@@ -32,24 +32,24 @@ namespace Org.OpenAPITools.Model
     
     public enum EnumClass
     {
-        
         /// 
         /// Enum Abc for value: _abc
         /// 
         [EnumMember(Value = "_abc")]
         Abc = 1,
-        
+
         /// 
         /// Enum Efg for value: -efg
         /// 
         [EnumMember(Value = "-efg")]
         Efg = 2,
-        
+
         /// 
         /// Enum Xyz for value: (xyz)
         /// 
         [EnumMember(Value = "(xyz)")]
         Xyz = 3
+
     }
 
 }
diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/EnumTest.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/EnumTest.cs
index 663d01a2b23a..7099a980016f 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/EnumTest.cs
+++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/EnumTest.cs
@@ -36,24 +36,24 @@ namespace Org.OpenAPITools.Model
         [JsonConverter(typeof(StringEnumConverter))]
         public enum EnumStringEnum
         {
-            
             /// 
             /// Enum UPPER for value: UPPER
             /// 
             [EnumMember(Value = "UPPER")]
             UPPER = 1,
-            
+
             /// 
             /// Enum Lower for value: lower
             /// 
             [EnumMember(Value = "lower")]
             Lower = 2,
-            
+
             /// 
             /// Enum Empty for value: 
             /// 
             [EnumMember(Value = "")]
             Empty = 3
+
         }
 
         /// 
@@ -67,24 +67,24 @@ namespace Org.OpenAPITools.Model
         [JsonConverter(typeof(StringEnumConverter))]
         public enum EnumStringRequiredEnum
         {
-            
             /// 
             /// Enum UPPER for value: UPPER
             /// 
             [EnumMember(Value = "UPPER")]
             UPPER = 1,
-            
+
             /// 
             /// Enum Lower for value: lower
             /// 
             [EnumMember(Value = "lower")]
             Lower = 2,
-            
+
             /// 
             /// Enum Empty for value: 
             /// 
             [EnumMember(Value = "")]
             Empty = 3
+
         }
 
         /// 
@@ -97,18 +97,16 @@ namespace Org.OpenAPITools.Model
         /// 
         public enum EnumIntegerEnum
         {
-            
             /// 
             /// Enum NUMBER_1 for value: 1
             /// 
-            
             NUMBER_1 = 1,
-            
+
             /// 
             /// Enum NUMBER_MINUS_1 for value: -1
             /// 
-            
             NUMBER_MINUS_1 = -1
+
         }
 
         /// 
@@ -122,18 +120,18 @@ namespace Org.OpenAPITools.Model
         [JsonConverter(typeof(StringEnumConverter))]
         public enum EnumNumberEnum
         {
-            
             /// 
             /// Enum NUMBER_1_DOT_1 for value: 1.1
             /// 
             [EnumMember(Value = "1.1")]
             NUMBER_1_DOT_1 = 1,
-            
+
             /// 
             /// Enum NUMBER_MINUS_1_DOT_2 for value: -1.2
             /// 
             [EnumMember(Value = "-1.2")]
             NUMBER_MINUS_1_DOT_2 = 2
+
         }
 
         /// 
diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/File.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/File.cs
new file mode 100644
index 000000000000..68d564d17e72
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/File.cs
@@ -0,0 +1,125 @@
+/* 
+ * OpenAPI Petstore
+ *
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * OpenAPI spec version: 1.0.0
+ * 
+ * Generated by: https://github.com/openapitools/openapi-generator.git
+ */
+
+using System;
+using System.Linq;
+using System.IO;
+using System.Text;
+using System.Text.RegularExpressions;
+using System.Collections;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Runtime.Serialization;
+using Newtonsoft.Json;
+using Newtonsoft.Json.Converters;
+using System.ComponentModel.DataAnnotations;
+using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter;
+
+namespace Org.OpenAPITools.Model
+{
+    /// 
+    /// Must be named `File` for test.
+    /// 
+    [DataContract]
+    public partial class File :  IEquatable, IValidatableObject
+    {
+        /// 
+        /// Initializes a new instance of the  class.
+        /// 
+        /// Test capitalization.
+        public File(string sourceURI = default(string))
+        {
+            this.SourceURI = sourceURI;
+        }
+        
+        /// 
+        /// Test capitalization
+        /// 
+        /// Test capitalization
+        [DataMember(Name="sourceURI", EmitDefaultValue=false)]
+        public string SourceURI { get; set; }
+
+        /// 
+        /// Returns the string presentation of the object
+        /// 
+        /// String presentation of the object
+        public override string ToString()
+        {
+            var sb = new StringBuilder();
+            sb.Append("class File {\n");
+            sb.Append("  SourceURI: ").Append(SourceURI).Append("\n");
+            sb.Append("}\n");
+            return sb.ToString();
+        }
+  
+        /// 
+        /// Returns the JSON string presentation of the object
+        /// 
+        /// JSON string presentation of the object
+        public virtual string ToJson()
+        {
+            return JsonConvert.SerializeObject(this, Formatting.Indented);
+        }
+
+        /// 
+        /// Returns true if objects are equal
+        /// 
+        /// Object to be compared
+        /// Boolean
+        public override bool Equals(object input)
+        {
+            return this.Equals(input as File);
+        }
+
+        /// 
+        /// Returns true if File instances are equal
+        /// 
+        /// Instance of File to be compared
+        /// Boolean
+        public bool Equals(File input)
+        {
+            if (input == null)
+                return false;
+
+            return 
+                (
+                    this.SourceURI == input.SourceURI ||
+                    (this.SourceURI != null &&
+                    this.SourceURI.Equals(input.SourceURI))
+                );
+        }
+
+        /// 
+        /// Gets the hash code
+        /// 
+        /// Hash code
+        public override int GetHashCode()
+        {
+            unchecked // Overflow is fine, just wrap
+            {
+                int hashCode = 41;
+                if (this.SourceURI != null)
+                    hashCode = hashCode * 59 + this.SourceURI.GetHashCode();
+                return hashCode;
+            }
+        }
+
+        /// 
+        /// To validate all properties of the instance
+        /// 
+        /// Validation context
+        /// Validation Result
+        IEnumerable IValidatableObject.Validate(ValidationContext validationContext)
+        {
+            yield break;
+        }
+    }
+
+}
diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs
new file mode 100644
index 000000000000..1505ab9c4b1c
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs
@@ -0,0 +1,140 @@
+/* 
+ * OpenAPI Petstore
+ *
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * OpenAPI spec version: 1.0.0
+ * 
+ * Generated by: https://github.com/openapitools/openapi-generator.git
+ */
+
+using System;
+using System.Linq;
+using System.IO;
+using System.Text;
+using System.Text.RegularExpressions;
+using System.Collections;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Runtime.Serialization;
+using Newtonsoft.Json;
+using Newtonsoft.Json.Converters;
+using System.ComponentModel.DataAnnotations;
+using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter;
+
+namespace Org.OpenAPITools.Model
+{
+    /// 
+    /// FileSchemaTestClass
+    /// 
+    [DataContract]
+    public partial class FileSchemaTestClass :  IEquatable, IValidatableObject
+    {
+        /// 
+        /// Initializes a new instance of the  class.
+        /// 
+        /// file.
+        /// files.
+        public FileSchemaTestClass(System.IO.Stream file = default(System.IO.Stream), List files = default(List))
+        {
+            this.File = file;
+            this.Files = files;
+        }
+        
+        /// 
+        /// Gets or Sets File
+        /// 
+        [DataMember(Name="file", EmitDefaultValue=false)]
+        public System.IO.Stream File { get; set; }
+
+        /// 
+        /// Gets or Sets Files
+        /// 
+        [DataMember(Name="files", EmitDefaultValue=false)]
+        public List Files { get; set; }
+
+        /// 
+        /// Returns the string presentation of the object
+        /// 
+        /// String presentation of the object
+        public override string ToString()
+        {
+            var sb = new StringBuilder();
+            sb.Append("class FileSchemaTestClass {\n");
+            sb.Append("  File: ").Append(File).Append("\n");
+            sb.Append("  Files: ").Append(Files).Append("\n");
+            sb.Append("}\n");
+            return sb.ToString();
+        }
+  
+        /// 
+        /// Returns the JSON string presentation of the object
+        /// 
+        /// JSON string presentation of the object
+        public virtual string ToJson()
+        {
+            return JsonConvert.SerializeObject(this, Formatting.Indented);
+        }
+
+        /// 
+        /// Returns true if objects are equal
+        /// 
+        /// Object to be compared
+        /// Boolean
+        public override bool Equals(object input)
+        {
+            return this.Equals(input as FileSchemaTestClass);
+        }
+
+        /// 
+        /// Returns true if FileSchemaTestClass instances are equal
+        /// 
+        /// Instance of FileSchemaTestClass to be compared
+        /// Boolean
+        public bool Equals(FileSchemaTestClass input)
+        {
+            if (input == null)
+                return false;
+
+            return 
+                (
+                    this.File == input.File ||
+                    (this.File != null &&
+                    this.File.Equals(input.File))
+                ) && 
+                (
+                    this.Files == input.Files ||
+                    this.Files != null &&
+                    this.Files.SequenceEqual(input.Files)
+                );
+        }
+
+        /// 
+        /// Gets the hash code
+        /// 
+        /// Hash code
+        public override int GetHashCode()
+        {
+            unchecked // Overflow is fine, just wrap
+            {
+                int hashCode = 41;
+                if (this.File != null)
+                    hashCode = hashCode * 59 + this.File.GetHashCode();
+                if (this.Files != null)
+                    hashCode = hashCode * 59 + this.Files.GetHashCode();
+                return hashCode;
+            }
+        }
+
+        /// 
+        /// To validate all properties of the instance
+        /// 
+        /// Validation context
+        /// Validation Result
+        IEnumerable IValidatableObject.Validate(ValidationContext validationContext)
+        {
+            yield break;
+        }
+    }
+
+}
diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/MapTest.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/MapTest.cs
index 25c030067064..1c5bfa70198a 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/MapTest.cs
+++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/MapTest.cs
@@ -36,18 +36,18 @@ namespace Org.OpenAPITools.Model
         [JsonConverter(typeof(StringEnumConverter))]
         public enum InnerEnum
         {
-            
             /// 
             /// Enum UPPER for value: UPPER
             /// 
             [EnumMember(Value = "UPPER")]
             UPPER = 1,
-            
+
             /// 
             /// Enum Lower for value: lower
             /// 
             [EnumMember(Value = "lower")]
             Lower = 2
+
         }
 
 
@@ -61,10 +61,14 @@ namespace Org.OpenAPITools.Model
         /// 
         /// mapMapOfString.
         /// mapOfEnumString.
-        public MapTest(Dictionary> mapMapOfString = default(Dictionary>), Dictionary mapOfEnumString = default(Dictionary))
+        /// directMap.
+        /// indirectMap.
+        public MapTest(Dictionary> mapMapOfString = default(Dictionary>), Dictionary mapOfEnumString = default(Dictionary), Dictionary directMap = default(Dictionary), StringBooleanMap indirectMap = default(StringBooleanMap))
         {
             this.MapMapOfString = mapMapOfString;
             this.MapOfEnumString = mapOfEnumString;
+            this.DirectMap = directMap;
+            this.IndirectMap = indirectMap;
         }
         
         /// 
@@ -74,6 +78,18 @@ namespace Org.OpenAPITools.Model
         public Dictionary> MapMapOfString { get; set; }
 
 
+        /// 
+        /// Gets or Sets DirectMap
+        /// 
+        [DataMember(Name="direct_map", EmitDefaultValue=false)]
+        public Dictionary DirectMap { get; set; }
+
+        /// 
+        /// Gets or Sets IndirectMap
+        /// 
+        [DataMember(Name="indirect_map", EmitDefaultValue=false)]
+        public StringBooleanMap IndirectMap { get; set; }
+
         /// 
         /// Returns the string presentation of the object
         /// 
@@ -84,6 +100,8 @@ namespace Org.OpenAPITools.Model
             sb.Append("class MapTest {\n");
             sb.Append("  MapMapOfString: ").Append(MapMapOfString).Append("\n");
             sb.Append("  MapOfEnumString: ").Append(MapOfEnumString).Append("\n");
+            sb.Append("  DirectMap: ").Append(DirectMap).Append("\n");
+            sb.Append("  IndirectMap: ").Append(IndirectMap).Append("\n");
             sb.Append("}\n");
             return sb.ToString();
         }
@@ -127,6 +145,16 @@ namespace Org.OpenAPITools.Model
                     this.MapOfEnumString == input.MapOfEnumString ||
                     this.MapOfEnumString != null &&
                     this.MapOfEnumString.SequenceEqual(input.MapOfEnumString)
+                ) && 
+                (
+                    this.DirectMap == input.DirectMap ||
+                    this.DirectMap != null &&
+                    this.DirectMap.SequenceEqual(input.DirectMap)
+                ) && 
+                (
+                    this.IndirectMap == input.IndirectMap ||
+                    (this.IndirectMap != null &&
+                    this.IndirectMap.Equals(input.IndirectMap))
                 );
         }
 
@@ -143,6 +171,10 @@ namespace Org.OpenAPITools.Model
                     hashCode = hashCode * 59 + this.MapMapOfString.GetHashCode();
                 if (this.MapOfEnumString != null)
                     hashCode = hashCode * 59 + this.MapOfEnumString.GetHashCode();
+                if (this.DirectMap != null)
+                    hashCode = hashCode * 59 + this.DirectMap.GetHashCode();
+                if (this.IndirectMap != null)
+                    hashCode = hashCode * 59 + this.IndirectMap.GetHashCode();
                 return hashCode;
             }
         }
diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/Order.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/Order.cs
index 27863dccbae7..f895f035192b 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/Order.cs
+++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/Order.cs
@@ -37,24 +37,24 @@ namespace Org.OpenAPITools.Model
         [JsonConverter(typeof(StringEnumConverter))]
         public enum StatusEnum
         {
-            
             /// 
             /// Enum Placed for value: placed
             /// 
             [EnumMember(Value = "placed")]
             Placed = 1,
-            
+
             /// 
             /// Enum Approved for value: approved
             /// 
             [EnumMember(Value = "approved")]
             Approved = 2,
-            
+
             /// 
             /// Enum Delivered for value: delivered
             /// 
             [EnumMember(Value = "delivered")]
             Delivered = 3
+
         }
 
         /// 
diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/OuterEnum.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/OuterEnum.cs
index 2716692ee0ec..be116aff60ab 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/OuterEnum.cs
+++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/OuterEnum.cs
@@ -32,24 +32,24 @@ namespace Org.OpenAPITools.Model
     
     public enum OuterEnum
     {
-        
         /// 
         /// Enum Placed for value: placed
         /// 
         [EnumMember(Value = "placed")]
         Placed = 1,
-        
+
         /// 
         /// Enum Approved for value: approved
         /// 
         [EnumMember(Value = "approved")]
         Approved = 2,
-        
+
         /// 
         /// Enum Delivered for value: delivered
         /// 
         [EnumMember(Value = "delivered")]
         Delivered = 3
+
     }
 
 }
diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/Pet.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/Pet.cs
index 02628fcf1240..1e213e5006ad 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/Pet.cs
+++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/Pet.cs
@@ -37,24 +37,24 @@ namespace Org.OpenAPITools.Model
         [JsonConverter(typeof(StringEnumConverter))]
         public enum StatusEnum
         {
-            
             /// 
             /// Enum Available for value: available
             /// 
             [EnumMember(Value = "available")]
             Available = 1,
-            
+
             /// 
             /// Enum Pending for value: pending
             /// 
             [EnumMember(Value = "pending")]
             Pending = 2,
-            
+
             /// 
             /// Enum Sold for value: sold
             /// 
             [EnumMember(Value = "sold")]
             Sold = 3
+
         }
 
         /// 
diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/StringBooleanMap.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/StringBooleanMap.cs
new file mode 100644
index 000000000000..df4dc6e486dc
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/StringBooleanMap.cs
@@ -0,0 +1,110 @@
+/* 
+ * OpenAPI Petstore
+ *
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * OpenAPI spec version: 1.0.0
+ * 
+ * Generated by: https://github.com/openapitools/openapi-generator.git
+ */
+
+using System;
+using System.Linq;
+using System.IO;
+using System.Text;
+using System.Text.RegularExpressions;
+using System.Collections;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Runtime.Serialization;
+using Newtonsoft.Json;
+using Newtonsoft.Json.Converters;
+using System.ComponentModel.DataAnnotations;
+using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter;
+
+namespace Org.OpenAPITools.Model
+{
+    /// 
+    /// StringBooleanMap
+    /// 
+    [DataContract]
+    public partial class StringBooleanMap : Dictionary,  IEquatable, IValidatableObject
+    {
+        /// 
+        /// Initializes a new instance of the  class.
+        /// 
+        [JsonConstructorAttribute]
+        public StringBooleanMap() : base()
+        {
+        }
+        
+        /// 
+        /// Returns the string presentation of the object
+        /// 
+        /// String presentation of the object
+        public override string ToString()
+        {
+            var sb = new StringBuilder();
+            sb.Append("class StringBooleanMap {\n");
+            sb.Append("  ").Append(base.ToString().Replace("\n", "\n  ")).Append("\n");
+            sb.Append("}\n");
+            return sb.ToString();
+        }
+  
+        /// 
+        /// Returns the JSON string presentation of the object
+        /// 
+        /// JSON string presentation of the object
+        public string ToJson()
+        {
+            return JsonConvert.SerializeObject(this, Formatting.Indented);
+        }
+
+        /// 
+        /// Returns true if objects are equal
+        /// 
+        /// Object to be compared
+        /// Boolean
+        public override bool Equals(object input)
+        {
+            return this.Equals(input as StringBooleanMap);
+        }
+
+        /// 
+        /// Returns true if StringBooleanMap instances are equal
+        /// 
+        /// Instance of StringBooleanMap to be compared
+        /// Boolean
+        public bool Equals(StringBooleanMap input)
+        {
+            if (input == null)
+                return false;
+
+            return base.Equals(input);
+        }
+
+        /// 
+        /// Gets the hash code
+        /// 
+        /// Hash code
+        public override int GetHashCode()
+        {
+            unchecked // Overflow is fine, just wrap
+            {
+                int hashCode = base.GetHashCode();
+                return hashCode;
+            }
+        }
+
+        /// 
+        /// To validate all properties of the instance
+        /// 
+        /// Validation context
+        /// Validation Result
+        IEnumerable IValidatableObject.Validate(ValidationContext validationContext)
+        {
+            yield break;
+        }
+    }
+
+}

From 0cd6d8c139a1faf93b393f65e13a832b45518ee2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rytis=20Karpu=C5=A1ka?= 
Date: Sun, 12 Aug 2018 14:44:07 +0300
Subject: [PATCH 13/27] Do not declare destructor as default when destructor is
 explicitly declared. (#732)

---
 .../src/main/resources/cpp-rest-sdk-client/api-header.mustache  | 2 +-
 samples/client/petstore/cpp-restsdk/api/PetApi.h                | 2 +-
 samples/client/petstore/cpp-restsdk/api/StoreApi.h              | 2 +-
 samples/client/petstore/cpp-restsdk/api/UserApi.h               | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/api-header.mustache b/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/api-header.mustache
index 8f7aad025476..fbf515deb156 100644
--- a/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/api-header.mustache
+++ b/modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/api-header.mustache
@@ -51,7 +51,7 @@ public:
     ~{{classname}}() override;
     {{/gmockApis}}
     {{^gmockApis}}
-    virtual ~{{classname}}() = default;
+    virtual ~{{classname}}();
     {{/gmockApis}}
 
     {{#operation}}
diff --git a/samples/client/petstore/cpp-restsdk/api/PetApi.h b/samples/client/petstore/cpp-restsdk/api/PetApi.h
index 2f5c70e77e6b..b2d42109f457 100644
--- a/samples/client/petstore/cpp-restsdk/api/PetApi.h
+++ b/samples/client/petstore/cpp-restsdk/api/PetApi.h
@@ -43,7 +43,7 @@ public:
 
     explicit PetApi( std::shared_ptr apiClient );
 
-    virtual ~PetApi() = default;
+    virtual ~PetApi();
 
     /// 
     /// Add a new pet to the store
diff --git a/samples/client/petstore/cpp-restsdk/api/StoreApi.h b/samples/client/petstore/cpp-restsdk/api/StoreApi.h
index 4d78791de44c..0b9f2b5c0f43 100644
--- a/samples/client/petstore/cpp-restsdk/api/StoreApi.h
+++ b/samples/client/petstore/cpp-restsdk/api/StoreApi.h
@@ -42,7 +42,7 @@ public:
 
     explicit StoreApi( std::shared_ptr apiClient );
 
-    virtual ~StoreApi() = default;
+    virtual ~StoreApi();
 
     /// 
     /// Delete purchase order by ID
diff --git a/samples/client/petstore/cpp-restsdk/api/UserApi.h b/samples/client/petstore/cpp-restsdk/api/UserApi.h
index d4218faa6a9c..76e5e7894dff 100644
--- a/samples/client/petstore/cpp-restsdk/api/UserApi.h
+++ b/samples/client/petstore/cpp-restsdk/api/UserApi.h
@@ -42,7 +42,7 @@ public:
 
     explicit UserApi( std::shared_ptr apiClient );
 
-    virtual ~UserApi() = default;
+    virtual ~UserApi();
 
     /// 
     /// Create user

From 1559c4fadd8451683adc88900ca2c2fb1e5d8162 Mon Sep 17 00:00:00 2001
From: attrobit 
Date: Sun, 12 Aug 2018 16:37:19 +0200
Subject: [PATCH 14/27] Issue 758 root resource (#771)

* Unit-Test for JavaJAXRSSpecServerCodegen.

* Path generation for primary resource fixed.

* Unit test for toApiName.

* Review-Feedback: blank line removed.
---
 .../languages/JavaJAXRSSpecServerCodegen.java |  30 ++++-
 .../jaxrs/JavaJAXRSSpecServerCodegenTest.java | 108 ++++++++++++++++++
 2 files changed, 132 insertions(+), 6 deletions(-)
 create mode 100644 modules/openapi-generator/src/test/java/org/openapitools/codegen/java/jaxrs/JavaJAXRSSpecServerCodegenTest.java

diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaJAXRSSpecServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaJAXRSSpecServerCodegen.java
index 07f38793d039..2242ed2dd41a 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaJAXRSSpecServerCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaJAXRSSpecServerCodegen.java
@@ -18,7 +18,6 @@
 package org.openapitools.codegen.languages;
 
 import io.swagger.v3.oas.models.Operation;
-
 import org.apache.commons.lang3.StringUtils;
 import org.openapitools.codegen.CliOption;
 import org.openapitools.codegen.CodegenConstants;
@@ -42,7 +41,9 @@ public class JavaJAXRSSpecServerCodegen extends AbstractJavaJAXRSServerCodegen {
     private boolean interfaceOnly = false;
     private boolean returnResponse = false;
     private boolean generatePom = true;
-
+    
+    private String primaryResourceName;
+    
     public JavaJAXRSSpecServerCodegen() {
         super();
         invokerPackage = "org.openapitools.api";
@@ -147,19 +148,26 @@ public class JavaJAXRSSpecServerCodegen extends AbstractJavaJAXRSServerCodegen {
         if (pos > 0) {
             basePath = basePath.substring(0, pos);
         }
-
+        
+        String operationKey = basePath;
         if (StringUtils.isEmpty(basePath)) {
-            basePath = "default";
+            basePath = tag;
+            operationKey = "";
+            primaryResourceName = tag;
+        } else if (basePath.matches("\\{.*\\}")) {
+            basePath = tag;
+            operationKey = "";
+            co.subresourceOperation = true;
         } else {
             if (co.path.startsWith("/" + basePath)) {
                 co.path = co.path.substring(("/" + basePath).length());
             }
             co.subresourceOperation = !co.path.isEmpty();
         }
-        List opList = operations.get(basePath);
+        List opList = operations.get(operationKey);
         if (opList == null || opList.isEmpty()) {
             opList = new ArrayList();
-            operations.put(basePath, opList);
+            operations.put(operationKey, opList);
         }
         opList.add(co);
         co.baseName = basePath;
@@ -186,4 +194,14 @@ public class JavaJAXRSSpecServerCodegen extends AbstractJavaJAXRSServerCodegen {
     public String getHelp() {
         return "Generates a Java JAXRS Server according to JAXRS 2.0 specification.";
     }
+    
+    @Override
+    public String toApiName(final String name) {
+        String computed = name;
+        if (computed.length() == 0) {
+            return primaryResourceName + "Api";
+        }
+        computed = sanitizeName(computed);
+        return camelize(computed) + "Api";
+    }
 }
diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/jaxrs/JavaJAXRSSpecServerCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/jaxrs/JavaJAXRSSpecServerCodegenTest.java
new file mode 100644
index 000000000000..1ccafa1e48fe
--- /dev/null
+++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/jaxrs/JavaJAXRSSpecServerCodegenTest.java
@@ -0,0 +1,108 @@
+package org.openapitools.codegen.java.jaxrs;
+
+import io.swagger.v3.oas.models.Operation;
+import org.junit.Before;
+import org.junit.Test;
+import org.openapitools.codegen.CodegenOperation;
+import org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+/**
+ * Unit-Test for {@link org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen}.
+ *
+ * @author attrobit
+ */
+public class JavaJAXRSSpecServerCodegenTest {
+    
+    private JavaJAXRSSpecServerCodegen instance;
+    
+    @Before
+    public void before() {
+        instance = new JavaJAXRSSpecServerCodegen();
+    }
+    
+    /**
+     * Test
+     * {@link JavaJAXRSSpecServerCodegen#addOperationToGroup(String, String, Operation, CodegenOperation, Map)} for Resource with path "/" and set tag.
+     */
+    @Test
+    public void testAddOperationToGroupForRootResource() {
+        CodegenOperation codegenOperation = new CodegenOperation();
+        codegenOperation.operationId = "findPrimaryresource";
+        Operation operation = new Operation();
+        Map> operationList = new HashMap<>();
+        
+        instance.addOperationToGroup("Primaryresource", "/", operation, codegenOperation, operationList);
+        
+        assertThat(operationList.size(), is(1));
+        assertThat(operationList.containsKey(""), is(true));
+        assertThat(codegenOperation.baseName, is("Primaryresource"));
+    }
+    
+    /**
+     * Test
+     * {@link JavaJAXRSSpecServerCodegen#addOperationToGroup(String, String, Operation, CodegenOperation, Map)} for Resource with path param.
+     */
+    @Test
+    public void testAddOperationToGroupForRootResourcePathParam() {
+        CodegenOperation codegenOperation = new CodegenOperation();
+        codegenOperation.operationId = "getPrimaryresource";
+        Operation operation = new Operation();
+        Map> operationList = new HashMap<>();
+        
+        instance.addOperationToGroup("Primaryresource", "/{uuid}", operation, codegenOperation, operationList);
+        
+        assertThat(operationList.size(), is(1));
+        assertThat(operationList.containsKey(""), is(true));
+        assertThat(codegenOperation.baseName, is("Primaryresource"));
+    }
+    
+    /**
+     * Test
+     * {@link JavaJAXRSSpecServerCodegen#addOperationToGroup(String, String,
+     * Operation, CodegenOperation, Map)} for Resource with path "/subresource".
+     */
+    @Test
+    public void testAddOperationToGroupForSubresource() {
+        CodegenOperation codegenOperation = new CodegenOperation();
+        codegenOperation.path = "/subresource";
+        Operation operation = new Operation();
+        Map> operationList = new HashMap<>();
+        
+        instance.addOperationToGroup("Default", "/subresource", operation, codegenOperation, operationList);
+        
+        assertThat(codegenOperation.baseName, is("subresource"));
+        assertThat(operationList.size(), is(1));
+        assertThat(operationList.containsKey("subresource"), is(true));
+    }
+    
+    /**
+     * Test {@link JavaJAXRSSpecServerCodegen#toApiName(String)} with subresource.
+     */
+    @Test
+    public void testToApiNameForSubresource() {
+        final String subresource = instance.toApiName("subresource");
+        assertThat(subresource, is("SubresourceApi"));
+    }
+    
+    /**
+     * Test {@link JavaJAXRSSpecServerCodegen#toApiName(String)} with primary resource.
+     */
+    @Test
+    public void testToApiNameForPrimaryResource() {
+        CodegenOperation codegenOperation = new CodegenOperation();
+        codegenOperation.operationId = "findPrimaryresource";
+        Operation operation = new Operation();
+        Map> operationList = new HashMap<>();
+        instance.addOperationToGroup("Primaryresource", "/", operation, codegenOperation, operationList);
+        
+        final String subresource = instance.toApiName("");
+        assertThat(subresource, is("PrimaryresourceApi"));
+    }
+}

From 5e1c4cde5093b6f04fd111cfc54203638e24b8de Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Bresson?= 
Date: Mon, 13 Aug 2018 07:26:34 +0200
Subject: [PATCH 15/27] Remove duplicate variable declaration (#792)

---
 .../languages/PhpLaravelServerCodegen.java    | 19 +------------------
 1 file changed, 1 insertion(+), 18 deletions(-)

diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpLaravelServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpLaravelServerCodegen.java
index 0d4f91181de6..ed9215d40101 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpLaravelServerCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpLaravelServerCodegen.java
@@ -17,31 +17,13 @@
 
 package org.openapitools.codegen.languages;
 
-import io.swagger.models.properties.*;
-import io.swagger.v3.oas.models.*;
-import io.swagger.v3.oas.models.media.*;
-import io.swagger.v3.oas.models.parameters.*;
 import org.openapitools.codegen.*;
 
 import java.io.File;
 import java.util.*;
 
-import io.swagger.v3.oas.models.media.*;
-import io.swagger.v3.oas.models.PathItem;
-import io.swagger.v3.oas.models.PathItem.HttpMethod;
-import io.swagger.v3.oas.models.*;
-import io.swagger.v3.oas.models.parameters.*;
-import io.swagger.v3.core.util.Yaml;
-
-import org.apache.commons.lang3.StringUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-
 public class PhpLaravelServerCodegen extends AbstractPhpCodegen {
-    @SuppressWarnings("hiding")
     protected String apiVersion = "1.0.0";
-    protected String variableNamingConvention = "camelCase";
 
     /**
      * Configures the type of generator.
@@ -80,6 +62,7 @@ public class PhpLaravelServerCodegen extends AbstractPhpCodegen {
         super();
 
         embeddedTemplateDir = templateDir = "php-laravel";
+        variableNamingConvention = "camelCase";
 
         /*
          * packPath

From c237fe9f1c7c162d9ed870ffb4b8c8cb561b345d Mon Sep 17 00:00:00 2001
From: William Cheng 
Date: Mon, 13 Aug 2018 13:27:45 +0800
Subject: [PATCH 16/27] Enhancements to documentation generators (samples,
 default values, etc) (#790)

* enhancements to doc generators (samples, default values, etc)

* add 3.3.x to PR template
---
 .github/PULL_REQUEST_TEMPLATE.md                    |   2 +-
 bin/dynamic-html.sh                                 |   2 +-
 bin/html-markdown.sh                                |   2 +-
 bin/html-petstore.sh                                |   2 +-
 bin/html2-petstore.sh                               |   2 +-
 bin/windows/html-petstore.bat                       |   2 +-
 bin/windows/html2-petstore.bat                      |   2 +-
 .../codegen/languages/ConfluenceWikiCodegen.java    |   6 +++---
 .../codegen/languages/StaticDocCodegen.java         |   8 ++++----
 .../codegen/languages/StaticHtml2Generator.java     |   6 +++---
 .../codegen/languages/StaticHtmlGenerator.java      |   6 +++---
 .../assets/css/bootstrap-responsive.css             |   0
 .../assets/css/bootstrap.css                        |   0
 .../assets/css/site.css                             |   0
 .../assets/css/style.css                            |   0
 .../assets/images/logo.png                          | Bin
 .../assets/js/bootstrap.js                          |   0
 .../assets/js/jquery-1.8.3.min.js                   |   0
 .../assets/js/main.js                               |   0
 .../index.mustache                                  |   0
 .../main.mustache                                   |   0
 .../model.mustache                                  |   0
 .../operation.mustache                              |   0
 .../package.mustache                                |   0
 .../{swagger-static => openapi-static}/pom.xml      |   0
 .../documentation/cwiki/.openapi-generator/VERSION  |   2 +-
 .../dynamic-html/.openapi-generator-ignore          |   0
 .../dynamic-html/.openapi-generator/VERSION         |   1 +
 .../docs/assets/css/bootstrap-responsive.css        |   0
 .../dynamic-html/docs/assets/css/bootstrap.css      |   0
 .../dynamic-html/docs/assets/css/style.css          |   0
 .../dynamic-html/docs/assets/images/logo.png        | Bin
 .../dynamic-html/docs/assets/js/bootstrap.js        |   0
 .../dynamic-html/docs/assets/js/jquery-1.8.3.min.js |   0
 .../dynamic-html/docs/assets/js/main.js             |   0
 .../dynamic-html/docs/index.html                    |   0
 .../dynamic-html/docs/models/ApiResponse.html       |   0
 .../dynamic-html/docs/models/Category.html          |   0
 .../dynamic-html/docs/models/Order.html             |   0
 .../dynamic-html/docs/models/Pet.html               |   0
 .../dynamic-html/docs/models/Tag.html               |   0
 .../dynamic-html/docs/models/User.html              |   0
 .../dynamic-html/docs/operations/PetApi.html        |   0
 .../dynamic-html/docs/operations/StoreApi.html      |   0
 .../dynamic-html/docs/operations/UserApi.html       |   0
 samples/{ => documentation}/dynamic-html/main.js    |   0
 .../{ => documentation}/dynamic-html/package.json   |   0
 .../html.md/.openapi-generator-ignore               |   0
 .../html.md}/.openapi-generator/VERSION             |   0
 samples/{ => documentation}/html.md/index.html      |   0
 .../html/.openapi-generator-ignore                  |   0
 .../documentation/html/.openapi-generator/VERSION   |   1 +
 samples/{ => documentation}/html/index.html         |   4 ++--
 .../html2/.openapi-generator-ignore                 |   0
 .../documentation/html2/.openapi-generator/VERSION  |   1 +
 samples/{ => documentation}/html2/index.html        |   2 +-
 samples/html.md/.openapi-generator/VERSION          |   1 -
 samples/html/.openapi-generator/VERSION             |   1 -
 samples/html2/.openapi-generator/VERSION            |   1 -
 59 files changed, 27 insertions(+), 27 deletions(-)
 rename modules/openapi-generator/src/main/resources/{swagger-static => openapi-static}/assets/css/bootstrap-responsive.css (100%)
 rename modules/openapi-generator/src/main/resources/{swagger-static => openapi-static}/assets/css/bootstrap.css (100%)
 rename modules/openapi-generator/src/main/resources/{swagger-static => openapi-static}/assets/css/site.css (100%)
 rename modules/openapi-generator/src/main/resources/{swagger-static => openapi-static}/assets/css/style.css (100%)
 rename modules/openapi-generator/src/main/resources/{swagger-static => openapi-static}/assets/images/logo.png (100%)
 rename modules/openapi-generator/src/main/resources/{swagger-static => openapi-static}/assets/js/bootstrap.js (100%)
 rename modules/openapi-generator/src/main/resources/{swagger-static => openapi-static}/assets/js/jquery-1.8.3.min.js (100%)
 rename modules/openapi-generator/src/main/resources/{swagger-static => openapi-static}/assets/js/main.js (100%)
 rename modules/openapi-generator/src/main/resources/{swagger-static => openapi-static}/index.mustache (100%)
 rename modules/openapi-generator/src/main/resources/{swagger-static => openapi-static}/main.mustache (100%)
 rename modules/openapi-generator/src/main/resources/{swagger-static => openapi-static}/model.mustache (100%)
 rename modules/openapi-generator/src/main/resources/{swagger-static => openapi-static}/operation.mustache (100%)
 rename modules/openapi-generator/src/main/resources/{swagger-static => openapi-static}/package.mustache (100%)
 rename modules/openapi-generator/src/main/resources/{swagger-static => openapi-static}/pom.xml (100%)
 rename samples/{ => documentation}/dynamic-html/.openapi-generator-ignore (100%)
 create mode 100644 samples/documentation/dynamic-html/.openapi-generator/VERSION
 rename samples/{ => documentation}/dynamic-html/docs/assets/css/bootstrap-responsive.css (100%)
 rename samples/{ => documentation}/dynamic-html/docs/assets/css/bootstrap.css (100%)
 rename samples/{ => documentation}/dynamic-html/docs/assets/css/style.css (100%)
 rename samples/{ => documentation}/dynamic-html/docs/assets/images/logo.png (100%)
 rename samples/{ => documentation}/dynamic-html/docs/assets/js/bootstrap.js (100%)
 rename samples/{ => documentation}/dynamic-html/docs/assets/js/jquery-1.8.3.min.js (100%)
 rename samples/{ => documentation}/dynamic-html/docs/assets/js/main.js (100%)
 rename samples/{ => documentation}/dynamic-html/docs/index.html (100%)
 rename samples/{ => documentation}/dynamic-html/docs/models/ApiResponse.html (100%)
 rename samples/{ => documentation}/dynamic-html/docs/models/Category.html (100%)
 rename samples/{ => documentation}/dynamic-html/docs/models/Order.html (100%)
 rename samples/{ => documentation}/dynamic-html/docs/models/Pet.html (100%)
 rename samples/{ => documentation}/dynamic-html/docs/models/Tag.html (100%)
 rename samples/{ => documentation}/dynamic-html/docs/models/User.html (100%)
 rename samples/{ => documentation}/dynamic-html/docs/operations/PetApi.html (100%)
 rename samples/{ => documentation}/dynamic-html/docs/operations/StoreApi.html (100%)
 rename samples/{ => documentation}/dynamic-html/docs/operations/UserApi.html (100%)
 rename samples/{ => documentation}/dynamic-html/main.js (100%)
 rename samples/{ => documentation}/dynamic-html/package.json (100%)
 rename samples/{ => documentation}/html.md/.openapi-generator-ignore (100%)
 rename samples/{dynamic-html => documentation/html.md}/.openapi-generator/VERSION (100%)
 rename samples/{ => documentation}/html.md/index.html (100%)
 rename samples/{ => documentation}/html/.openapi-generator-ignore (100%)
 create mode 100644 samples/documentation/html/.openapi-generator/VERSION
 rename samples/{ => documentation}/html/index.html (99%)
 rename samples/{ => documentation}/html2/.openapi-generator-ignore (100%)
 create mode 100644 samples/documentation/html2/.openapi-generator/VERSION
 rename samples/{ => documentation}/html2/index.html (99%)
 delete mode 100644 samples/html.md/.openapi-generator/VERSION
 delete mode 100644 samples/html/.openapi-generator/VERSION
 delete mode 100644 samples/html2/.openapi-generator/VERSION

diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
index f2a2cd59b7e1..e93ef7163643 100644
--- a/.github/PULL_REQUEST_TEMPLATE.md
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -2,7 +2,7 @@
 
 - [ ] Read the [contribution guidelines](https://github.com/openapitools/openapi-generator/blob/master/CONTRIBUTING.md).
 - [ ] Ran the shell script under `./bin/` to update Petstore sample so that CIs can verify the change. (For instance, only need to run `./bin/{LANG}-petstore.sh` and `./bin/security/{LANG}-petstore.sh` if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in `.\bin\windows\`.
-- [ ] Filed the PR against the [correct branch](https://github.com/OpenAPITools/openapi-generator/wiki/Git-Branches): `master`, `4.0.x`. Default: `master`.
+- [ ] Filed the PR against the [correct branch](https://github.com/OpenAPITools/openapi-generator/wiki/Git-Branches): `master`, `3.3.x`, `4.0.x`. Default: `master`.
 - [ ] Copied the [technical committee](https://github.com/openapitools/openapi-generator/#62---openapi-generator-technical-committee) to review the pull request if your PR is targeting a particular programming language.
 
 ### Description of the PR
diff --git a/bin/dynamic-html.sh b/bin/dynamic-html.sh
index 7fc4f6a6ba7a..c98948913433 100755
--- a/bin/dynamic-html.sh
+++ b/bin/dynamic-html.sh
@@ -27,6 +27,6 @@ fi
 
 # if you've executed sbt assembly previously it will use that instead.
 export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dynamic-html  -o samples/dynamic-html $@"
+ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dynamic-html  -o samples/documentation/dynamic-html $@"
 
 java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/html-markdown.sh b/bin/html-markdown.sh
index 7808fe8c09df..391e549f2acc 100755
--- a/bin/html-markdown.sh
+++ b/bin/html-markdown.sh
@@ -27,6 +27,6 @@ fi
 
 # if you've executed sbt assembly previously it will use that instead.
 export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -i modules/openapi-generator/src/test/resources/2_0/markdown.yaml -g html  -o samples/html.md $@"
+ags="generate -i modules/openapi-generator/src/test/resources/2_0/markdown.yaml -g html  -o samples/documentation/html.md $@"
 
 java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/html-petstore.sh b/bin/html-petstore.sh
index 29743d6059aa..1b8fadbac987 100755
--- a/bin/html-petstore.sh
+++ b/bin/html-petstore.sh
@@ -27,6 +27,6 @@ fi
 
 # if you've executed sbt assembly previously it will use that instead.
 export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g html  -o samples/html $@"
+ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g html  -o samples/documentation/html $@"
 
 java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/html2-petstore.sh b/bin/html2-petstore.sh
index 5939463d6c1d..70f6b71c0e5d 100755
--- a/bin/html2-petstore.sh
+++ b/bin/html2-petstore.sh
@@ -27,6 +27,6 @@ fi
 
 # if you've executed sbt assembly previously it will use that instead.
 export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g html2  -o samples/html2 --additional-properties hideGenerationTimestamp=true $@"
+ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g html2  -o samples/documentation/html2 --additional-properties hideGenerationTimestamp=true $@"
 
 java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/windows/html-petstore.bat b/bin/windows/html-petstore.bat
index 178890387eff..5a4802d2963a 100755
--- a/bin/windows/html-petstore.bat
+++ b/bin/windows/html-petstore.bat
@@ -5,6 +5,6 @@ If Not Exist %executable% (
 )
 
 REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -DloggerPath=conf/log4j.properties
-set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g html -o samples\client\petstore\html
+set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g html -o samples\documentation\html
 
 java %JAVA_OPTS% -jar %executable% %ags%
diff --git a/bin/windows/html2-petstore.bat b/bin/windows/html2-petstore.bat
index 01330cdceea7..a6386d2efae2 100644
--- a/bin/windows/html2-petstore.bat
+++ b/bin/windows/html2-petstore.bat
@@ -5,6 +5,6 @@ If Not Exist %executable% (
 )
 
 REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -DloggerPath=conf/log4j.properties
-set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g html2 -o samples\html2
+set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g html2 -o samples\documentation\html2
 
 java %JAVA_OPTS% -jar %executable% %ags%
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ConfluenceWikiCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ConfluenceWikiCodegen.java
index 965d7b70207c..b9243aaa2600 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ConfluenceWikiCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ConfluenceWikiCodegen.java
@@ -60,9 +60,9 @@ public class ConfluenceWikiCodegen extends DefaultCodegen implements CodegenConf
         cliOptions.add(new CliOption(CodegenConstants.ARTIFACT_VERSION, CodegenConstants.ARTIFACT_VERSION_DESC));
 
         additionalProperties.put("appName", "OpenAPI Sample");
-        additionalProperties.put("appDescription", "A sample openapi server");
-        additionalProperties.put("infoUrl", "https://helloreverb.com");
-        additionalProperties.put("infoEmail", "hello@helloreverb.com");
+        additionalProperties.put("appDescription", "A sample OpenAPI server");
+        additionalProperties.put("infoUrl", "https://openapi-generator.tech");
+        additionalProperties.put("infoEmail", "team@openapitools.org");
         additionalProperties.put("licenseInfo", "All rights reserved");
         additionalProperties.put("licenseUrl", "http://apache.org/licenses/LICENSE-2.0.html");
         additionalProperties.put(CodegenConstants.INVOKER_PACKAGE, invokerPackage);
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/StaticDocCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/StaticDocCodegen.java
index 5067f039a9ab..56ff29d0f8e2 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/StaticDocCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/StaticDocCodegen.java
@@ -43,7 +43,7 @@ public class StaticDocCodegen extends DefaultCodegen implements CodegenConfig {
         outputFolder = "docs";
         modelTemplateFiles.put("model.mustache", ".html");
         apiTemplateFiles.put("operation.mustache", ".html");
-        embeddedTemplateDir = templateDir = "swagger-static";
+        embeddedTemplateDir = templateDir = "openapi-static";
 
         cliOptions.add(new CliOption(CodegenConstants.INVOKER_PACKAGE, CodegenConstants.INVOKER_PACKAGE_DESC));
         cliOptions.add(new CliOption(CodegenConstants.GROUP_ID, CodegenConstants.GROUP_ID_DESC));
@@ -94,8 +94,8 @@ public class StaticDocCodegen extends DefaultCodegen implements CodegenConfig {
     }
 
     @Override
-    public String escapeReservedWord(String name) {           
-        if(this.reservedWordsMappings().containsKey(name)) {
+    public String escapeReservedWord(String name) {
+        if (this.reservedWordsMappings().containsKey(name)) {
             return this.reservedWordsMappings().get(name);
         }
         return "_" + name;
@@ -121,5 +121,5 @@ public class StaticDocCodegen extends DefaultCodegen implements CodegenConfig {
     public String escapeUnsafeCharacters(String input) {
         // just return the original string
         return input;
-    }   
+    }
 }
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/StaticHtml2Generator.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/StaticHtml2Generator.java
index 37fda7e0b9b2..32e198a16529 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/StaticHtml2Generator.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/StaticHtml2Generator.java
@@ -82,9 +82,9 @@ public class StaticHtml2Generator extends DefaultCodegen implements CodegenConfi
         cliOptions.add(new CliOption(CodegenConstants.ARTIFACT_VERSION, CodegenConstants.ARTIFACT_VERSION_DESC));
 
         additionalProperties.put("appName", "OpenAPI Sample");
-        additionalProperties.put("appDescription", "A sample openapi server");
+        additionalProperties.put("appDescription", "A sample OpenAPI server");
         additionalProperties.put("infoUrl", "https://openapi-generator.tech");
-        additionalProperties.put("infoEmail", "contributors@openapitools.org");
+        additionalProperties.put("infoEmail", "team@openapitools.org");
         additionalProperties.put("licenseInfo", "All rights reserved");
         additionalProperties.put("licenseUrl", "http://apache.org/licenses/LICENSE-2.0.html");
         additionalProperties.put(CodegenConstants.INVOKER_PACKAGE, invokerPackage);
@@ -180,7 +180,7 @@ public class StaticHtml2Generator extends DefaultCodegen implements CodegenConfi
 
         Map vendorExtensions = openAPI.getExtensions();
         if (vendorExtensions != null) {
-            for(Map.Entry vendorExtension: vendorExtensions.entrySet()) {
+            for (Map.Entry vendorExtension : vendorExtensions.entrySet()) {
                 // Vendor extensions could be Maps (objects). If we wanted to iterate through them in our template files
                 // without knowing the keys beforehand, the default `toString` method renders them unusable. Instead, we
                 // convert them to JSON strings now, which means we can easily use them later.
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/StaticHtmlGenerator.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/StaticHtmlGenerator.java
index eb37f69b4538..feaac9dbc5db 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/StaticHtmlGenerator.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/StaticHtmlGenerator.java
@@ -69,9 +69,9 @@ public class StaticHtmlGenerator extends DefaultCodegen implements CodegenConfig
         cliOptions.add(new CliOption(CodegenConstants.ARTIFACT_VERSION, CodegenConstants.ARTIFACT_VERSION_DESC));
 
         additionalProperties.put("appName", "OpenAPI Sample");
-        additionalProperties.put("appDescription", "A sample openapi server");
-        additionalProperties.put("infoUrl", "https://helloreverb.com");
-        additionalProperties.put("infoEmail", "hello@helloreverb.com");
+        additionalProperties.put("appDescription", "A sample OpenAPI server");
+        additionalProperties.put("infoUrl", "https//openapi-generator.tech");
+        additionalProperties.put("infoEmail", "team@openapitools.org");
         additionalProperties.put("licenseInfo", "All rights reserved");
         additionalProperties.put("licenseUrl", "http://apache.org/licenses/LICENSE-2.0.html");
         additionalProperties.put(CodegenConstants.INVOKER_PACKAGE, invokerPackage);
diff --git a/modules/openapi-generator/src/main/resources/swagger-static/assets/css/bootstrap-responsive.css b/modules/openapi-generator/src/main/resources/openapi-static/assets/css/bootstrap-responsive.css
similarity index 100%
rename from modules/openapi-generator/src/main/resources/swagger-static/assets/css/bootstrap-responsive.css
rename to modules/openapi-generator/src/main/resources/openapi-static/assets/css/bootstrap-responsive.css
diff --git a/modules/openapi-generator/src/main/resources/swagger-static/assets/css/bootstrap.css b/modules/openapi-generator/src/main/resources/openapi-static/assets/css/bootstrap.css
similarity index 100%
rename from modules/openapi-generator/src/main/resources/swagger-static/assets/css/bootstrap.css
rename to modules/openapi-generator/src/main/resources/openapi-static/assets/css/bootstrap.css
diff --git a/modules/openapi-generator/src/main/resources/swagger-static/assets/css/site.css b/modules/openapi-generator/src/main/resources/openapi-static/assets/css/site.css
similarity index 100%
rename from modules/openapi-generator/src/main/resources/swagger-static/assets/css/site.css
rename to modules/openapi-generator/src/main/resources/openapi-static/assets/css/site.css
diff --git a/modules/openapi-generator/src/main/resources/swagger-static/assets/css/style.css b/modules/openapi-generator/src/main/resources/openapi-static/assets/css/style.css
similarity index 100%
rename from modules/openapi-generator/src/main/resources/swagger-static/assets/css/style.css
rename to modules/openapi-generator/src/main/resources/openapi-static/assets/css/style.css
diff --git a/modules/openapi-generator/src/main/resources/swagger-static/assets/images/logo.png b/modules/openapi-generator/src/main/resources/openapi-static/assets/images/logo.png
similarity index 100%
rename from modules/openapi-generator/src/main/resources/swagger-static/assets/images/logo.png
rename to modules/openapi-generator/src/main/resources/openapi-static/assets/images/logo.png
diff --git a/modules/openapi-generator/src/main/resources/swagger-static/assets/js/bootstrap.js b/modules/openapi-generator/src/main/resources/openapi-static/assets/js/bootstrap.js
similarity index 100%
rename from modules/openapi-generator/src/main/resources/swagger-static/assets/js/bootstrap.js
rename to modules/openapi-generator/src/main/resources/openapi-static/assets/js/bootstrap.js
diff --git a/modules/openapi-generator/src/main/resources/swagger-static/assets/js/jquery-1.8.3.min.js b/modules/openapi-generator/src/main/resources/openapi-static/assets/js/jquery-1.8.3.min.js
similarity index 100%
rename from modules/openapi-generator/src/main/resources/swagger-static/assets/js/jquery-1.8.3.min.js
rename to modules/openapi-generator/src/main/resources/openapi-static/assets/js/jquery-1.8.3.min.js
diff --git a/modules/openapi-generator/src/main/resources/swagger-static/assets/js/main.js b/modules/openapi-generator/src/main/resources/openapi-static/assets/js/main.js
similarity index 100%
rename from modules/openapi-generator/src/main/resources/swagger-static/assets/js/main.js
rename to modules/openapi-generator/src/main/resources/openapi-static/assets/js/main.js
diff --git a/modules/openapi-generator/src/main/resources/swagger-static/index.mustache b/modules/openapi-generator/src/main/resources/openapi-static/index.mustache
similarity index 100%
rename from modules/openapi-generator/src/main/resources/swagger-static/index.mustache
rename to modules/openapi-generator/src/main/resources/openapi-static/index.mustache
diff --git a/modules/openapi-generator/src/main/resources/swagger-static/main.mustache b/modules/openapi-generator/src/main/resources/openapi-static/main.mustache
similarity index 100%
rename from modules/openapi-generator/src/main/resources/swagger-static/main.mustache
rename to modules/openapi-generator/src/main/resources/openapi-static/main.mustache
diff --git a/modules/openapi-generator/src/main/resources/swagger-static/model.mustache b/modules/openapi-generator/src/main/resources/openapi-static/model.mustache
similarity index 100%
rename from modules/openapi-generator/src/main/resources/swagger-static/model.mustache
rename to modules/openapi-generator/src/main/resources/openapi-static/model.mustache
diff --git a/modules/openapi-generator/src/main/resources/swagger-static/operation.mustache b/modules/openapi-generator/src/main/resources/openapi-static/operation.mustache
similarity index 100%
rename from modules/openapi-generator/src/main/resources/swagger-static/operation.mustache
rename to modules/openapi-generator/src/main/resources/openapi-static/operation.mustache
diff --git a/modules/openapi-generator/src/main/resources/swagger-static/package.mustache b/modules/openapi-generator/src/main/resources/openapi-static/package.mustache
similarity index 100%
rename from modules/openapi-generator/src/main/resources/swagger-static/package.mustache
rename to modules/openapi-generator/src/main/resources/openapi-static/package.mustache
diff --git a/modules/openapi-generator/src/main/resources/swagger-static/pom.xml b/modules/openapi-generator/src/main/resources/openapi-static/pom.xml
similarity index 100%
rename from modules/openapi-generator/src/main/resources/swagger-static/pom.xml
rename to modules/openapi-generator/src/main/resources/openapi-static/pom.xml
diff --git a/samples/documentation/cwiki/.openapi-generator/VERSION b/samples/documentation/cwiki/.openapi-generator/VERSION
index 096bf47efe31..14900cee60e8 100644
--- a/samples/documentation/cwiki/.openapi-generator/VERSION
+++ b/samples/documentation/cwiki/.openapi-generator/VERSION
@@ -1 +1 @@
-3.0.0-SNAPSHOT
\ No newline at end of file
+3.2.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/dynamic-html/.openapi-generator-ignore b/samples/documentation/dynamic-html/.openapi-generator-ignore
similarity index 100%
rename from samples/dynamic-html/.openapi-generator-ignore
rename to samples/documentation/dynamic-html/.openapi-generator-ignore
diff --git a/samples/documentation/dynamic-html/.openapi-generator/VERSION b/samples/documentation/dynamic-html/.openapi-generator/VERSION
new file mode 100644
index 000000000000..14900cee60e8
--- /dev/null
+++ b/samples/documentation/dynamic-html/.openapi-generator/VERSION
@@ -0,0 +1 @@
+3.2.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/dynamic-html/docs/assets/css/bootstrap-responsive.css b/samples/documentation/dynamic-html/docs/assets/css/bootstrap-responsive.css
similarity index 100%
rename from samples/dynamic-html/docs/assets/css/bootstrap-responsive.css
rename to samples/documentation/dynamic-html/docs/assets/css/bootstrap-responsive.css
diff --git a/samples/dynamic-html/docs/assets/css/bootstrap.css b/samples/documentation/dynamic-html/docs/assets/css/bootstrap.css
similarity index 100%
rename from samples/dynamic-html/docs/assets/css/bootstrap.css
rename to samples/documentation/dynamic-html/docs/assets/css/bootstrap.css
diff --git a/samples/dynamic-html/docs/assets/css/style.css b/samples/documentation/dynamic-html/docs/assets/css/style.css
similarity index 100%
rename from samples/dynamic-html/docs/assets/css/style.css
rename to samples/documentation/dynamic-html/docs/assets/css/style.css
diff --git a/samples/dynamic-html/docs/assets/images/logo.png b/samples/documentation/dynamic-html/docs/assets/images/logo.png
similarity index 100%
rename from samples/dynamic-html/docs/assets/images/logo.png
rename to samples/documentation/dynamic-html/docs/assets/images/logo.png
diff --git a/samples/dynamic-html/docs/assets/js/bootstrap.js b/samples/documentation/dynamic-html/docs/assets/js/bootstrap.js
similarity index 100%
rename from samples/dynamic-html/docs/assets/js/bootstrap.js
rename to samples/documentation/dynamic-html/docs/assets/js/bootstrap.js
diff --git a/samples/dynamic-html/docs/assets/js/jquery-1.8.3.min.js b/samples/documentation/dynamic-html/docs/assets/js/jquery-1.8.3.min.js
similarity index 100%
rename from samples/dynamic-html/docs/assets/js/jquery-1.8.3.min.js
rename to samples/documentation/dynamic-html/docs/assets/js/jquery-1.8.3.min.js
diff --git a/samples/dynamic-html/docs/assets/js/main.js b/samples/documentation/dynamic-html/docs/assets/js/main.js
similarity index 100%
rename from samples/dynamic-html/docs/assets/js/main.js
rename to samples/documentation/dynamic-html/docs/assets/js/main.js
diff --git a/samples/dynamic-html/docs/index.html b/samples/documentation/dynamic-html/docs/index.html
similarity index 100%
rename from samples/dynamic-html/docs/index.html
rename to samples/documentation/dynamic-html/docs/index.html
diff --git a/samples/dynamic-html/docs/models/ApiResponse.html b/samples/documentation/dynamic-html/docs/models/ApiResponse.html
similarity index 100%
rename from samples/dynamic-html/docs/models/ApiResponse.html
rename to samples/documentation/dynamic-html/docs/models/ApiResponse.html
diff --git a/samples/dynamic-html/docs/models/Category.html b/samples/documentation/dynamic-html/docs/models/Category.html
similarity index 100%
rename from samples/dynamic-html/docs/models/Category.html
rename to samples/documentation/dynamic-html/docs/models/Category.html
diff --git a/samples/dynamic-html/docs/models/Order.html b/samples/documentation/dynamic-html/docs/models/Order.html
similarity index 100%
rename from samples/dynamic-html/docs/models/Order.html
rename to samples/documentation/dynamic-html/docs/models/Order.html
diff --git a/samples/dynamic-html/docs/models/Pet.html b/samples/documentation/dynamic-html/docs/models/Pet.html
similarity index 100%
rename from samples/dynamic-html/docs/models/Pet.html
rename to samples/documentation/dynamic-html/docs/models/Pet.html
diff --git a/samples/dynamic-html/docs/models/Tag.html b/samples/documentation/dynamic-html/docs/models/Tag.html
similarity index 100%
rename from samples/dynamic-html/docs/models/Tag.html
rename to samples/documentation/dynamic-html/docs/models/Tag.html
diff --git a/samples/dynamic-html/docs/models/User.html b/samples/documentation/dynamic-html/docs/models/User.html
similarity index 100%
rename from samples/dynamic-html/docs/models/User.html
rename to samples/documentation/dynamic-html/docs/models/User.html
diff --git a/samples/dynamic-html/docs/operations/PetApi.html b/samples/documentation/dynamic-html/docs/operations/PetApi.html
similarity index 100%
rename from samples/dynamic-html/docs/operations/PetApi.html
rename to samples/documentation/dynamic-html/docs/operations/PetApi.html
diff --git a/samples/dynamic-html/docs/operations/StoreApi.html b/samples/documentation/dynamic-html/docs/operations/StoreApi.html
similarity index 100%
rename from samples/dynamic-html/docs/operations/StoreApi.html
rename to samples/documentation/dynamic-html/docs/operations/StoreApi.html
diff --git a/samples/dynamic-html/docs/operations/UserApi.html b/samples/documentation/dynamic-html/docs/operations/UserApi.html
similarity index 100%
rename from samples/dynamic-html/docs/operations/UserApi.html
rename to samples/documentation/dynamic-html/docs/operations/UserApi.html
diff --git a/samples/dynamic-html/main.js b/samples/documentation/dynamic-html/main.js
similarity index 100%
rename from samples/dynamic-html/main.js
rename to samples/documentation/dynamic-html/main.js
diff --git a/samples/dynamic-html/package.json b/samples/documentation/dynamic-html/package.json
similarity index 100%
rename from samples/dynamic-html/package.json
rename to samples/documentation/dynamic-html/package.json
diff --git a/samples/html.md/.openapi-generator-ignore b/samples/documentation/html.md/.openapi-generator-ignore
similarity index 100%
rename from samples/html.md/.openapi-generator-ignore
rename to samples/documentation/html.md/.openapi-generator-ignore
diff --git a/samples/dynamic-html/.openapi-generator/VERSION b/samples/documentation/html.md/.openapi-generator/VERSION
similarity index 100%
rename from samples/dynamic-html/.openapi-generator/VERSION
rename to samples/documentation/html.md/.openapi-generator/VERSION
diff --git a/samples/html.md/index.html b/samples/documentation/html.md/index.html
similarity index 100%
rename from samples/html.md/index.html
rename to samples/documentation/html.md/index.html
diff --git a/samples/html/.openapi-generator-ignore b/samples/documentation/html/.openapi-generator-ignore
similarity index 100%
rename from samples/html/.openapi-generator-ignore
rename to samples/documentation/html/.openapi-generator-ignore
diff --git a/samples/documentation/html/.openapi-generator/VERSION b/samples/documentation/html/.openapi-generator/VERSION
new file mode 100644
index 000000000000..14900cee60e8
--- /dev/null
+++ b/samples/documentation/html/.openapi-generator/VERSION
@@ -0,0 +1 @@
+3.2.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/html/index.html b/samples/documentation/html/index.html
similarity index 99%
rename from samples/html/index.html
rename to samples/documentation/html/index.html
index 0d30f2be00bd..f2a1bfb3f77d 100644
--- a/samples/html/index.html
+++ b/samples/documentation/html/index.html
@@ -181,8 +181,8 @@ font-style: italic;
   
   

OpenAPI Petstore

This is a sample server Petstore server. For this sample, you can use the api key special-key to test the authorization filters.
-
More information: https://helloreverb.com
-
Contact Info: hello@helloreverb.com
+ +
Contact Info: team@openapitools.org
Version: 1.0.0
BasePath:/v2
Apache-2.0
diff --git a/samples/html2/.openapi-generator-ignore b/samples/documentation/html2/.openapi-generator-ignore similarity index 100% rename from samples/html2/.openapi-generator-ignore rename to samples/documentation/html2/.openapi-generator-ignore diff --git a/samples/documentation/html2/.openapi-generator/VERSION b/samples/documentation/html2/.openapi-generator/VERSION new file mode 100644 index 000000000000..14900cee60e8 --- /dev/null +++ b/samples/documentation/html2/.openapi-generator/VERSION @@ -0,0 +1 @@ +3.2.1-SNAPSHOT \ No newline at end of file diff --git a/samples/html2/index.html b/samples/documentation/html2/index.html similarity index 99% rename from samples/html2/index.html rename to samples/documentation/html2/index.html index 821520080add..5b9ce2fe173c 100644 --- a/samples/html2/index.html +++ b/samples/documentation/html2/index.html @@ -8103,7 +8103,7 @@ $(document).ready(function() {