diff --git a/docs/customization.md b/docs/customization.md index a31c57b8017..378ab2bff33 100644 --- a/docs/customization.md +++ b/docs/customization.md @@ -450,7 +450,11 @@ Another useful option is `inlineSchemaNameDefaults`, which allows you to customi --inline-schema-name-defaults arrayItemSuffix=_array_item,mapItemSuffix=_map_item ``` -Note: Only arrayItemSuffix, mapItemSuffix are supported at the moment. `SKIP_SCHEMA_REUSE=true` is a special value to skip reusing inline schemas. +Note: Only arrayItemSuffix, mapItemSuffix are supported at the moment. + +There are 2 special values: +- `SKIP_SCHEMA_REUSE=true` is a special value to skip reusing inline schemas. +- `REFACTOR_ALLOF_INLINE_SCHEMAS=true` will restore the 6.x (or below) behaviour to refactor allOf inline schemas into $ref. (v7.0.0 will skip the refactoring of these allOf inline schmeas by default) ## OpenAPI Normalizer 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 60935525b6d..b51686d7a51 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 @@ -2781,7 +2781,8 @@ public class DefaultCodegen implements CodegenConfig { // includes child's properties (all, required) in allProperties, allRequired addProperties(allProperties, allRequired, component, new HashSet<>()); } - break; // at most one child only + // in 7.0.0 release, we comment out below to allow more than 1 child schemas in allOf + //break; // at most one child only } } 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 84adb60425c..31c9bf79925 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 @@ -40,6 +40,7 @@ import org.openapitools.codegen.config.GlobalSettings; import org.openapitools.codegen.api.TemplatingEngineAdapter; import org.openapitools.codegen.api.TemplateFileType; import org.openapitools.codegen.ignore.CodegenIgnoreProcessor; +import org.openapitools.codegen.languages.CSharpNetCoreClientCodegen; import org.openapitools.codegen.meta.GeneratorMetadata; import org.openapitools.codegen.meta.Stability; import org.openapitools.codegen.model.ApiInfoMap; @@ -269,6 +270,13 @@ public class DefaultGenerator implements Generator { InlineModelResolver inlineModelResolver = new InlineModelResolver(); inlineModelResolver.setInlineSchemaNameMapping(config.inlineSchemaNameMapping()); inlineModelResolver.setInlineSchemaNameDefaults(config.inlineSchemaNameDefault()); + if (inlineModelResolver.refactorAllOfInlineSchemas == null && // option not set + config instanceof CSharpNetCoreClientCodegen) { // default to true for csharp-netcore generator + inlineModelResolver.refactorAllOfInlineSchemas = true; + LOGGER.info("inlineModelResolver.refactorAllOfInlineSchemas is default to true instead of false for `csharp-netcore` generator." + + "Add --inline-schema-name-defaults REFACTOR_ALLOF_INLINE_SCHEMAS=false in CLI for example to set it to false instead."); + } + inlineModelResolver.flatten(openAPI); } @@ -467,7 +475,7 @@ public class DefaultGenerator implements Generator { // HACK: Because this returns early, could lead to some invalid model reporting. String filename = config.modelFilename(templateName, name); Path path = java.nio.file.Paths.get(filename); - this.templateProcessor.skip(path,"Skipped prior to model processing due to schema mapping." ); + this.templateProcessor.skip(path, "Skipped prior to model processing due to schema mapping."); } continue; } 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 index 1d11972b44d..b0277639436 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/InlineModelResolver.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/InlineModelResolver.java @@ -47,6 +47,7 @@ public class InlineModelResolver { private Set inlineSchemaNameMappingValues = new HashSet<>(); public boolean resolveInlineEnums = false; public boolean skipSchemaReuse = false; // skip reusing inline schema if set to true + public Boolean refactorAllOfInlineSchemas = null; // refactor allOf inline schemas into $ref // structure mapper sorts properties alphabetically on write to ensure models are // serialized consistently for lookup of existing models @@ -80,6 +81,16 @@ public class InlineModelResolver { this.inlineSchemaNameDefaults.getOrDefault("SKIP_SCHEMA_REUSE", "false"))) { this.skipSchemaReuse = true; } + + if (this.inlineSchemaNameDefaults.containsKey("REFACTOR_ALLOF_INLINE_SCHEMAS")) { + if (Boolean.valueOf(this.inlineSchemaNameDefaults.get("REFACTOR_ALLOF_INLINE_SCHEMAS"))) { + this.refactorAllOfInlineSchemas = true; + } else { // set to false + this.refactorAllOfInlineSchemas = false; + } + } else { + // not set so default to null; + } } void flatten(OpenAPI openAPI) { @@ -233,6 +244,7 @@ public class InlineModelResolver { // allOf items are all non-model (e.g. type: string) only return false; } + if (m.getAnyOf() != null && !m.getAnyOf().isEmpty()) { return true; } @@ -351,9 +363,14 @@ public class InlineModelResolver { // Recurse to create $refs for inner models gatherInlineModels(inner, schemaName); if (isModelNeeded(inner)) { - Schema refSchema = this.makeSchemaInComponents(schemaName, inner); - newAllOf.add(refSchema); // replace with ref - atLeastOneModel = true; + if (Boolean.TRUE.equals(this.refactorAllOfInlineSchemas)) { + Schema refSchema = this.makeSchemaInComponents(schemaName, inner); + newAllOf.add(refSchema); // replace with ref + atLeastOneModel = true; + } else { // do not refactor allOf inline schemas + newAllOf.add(inner); + atLeastOneModel = true; + } } else { newAllOf.add(inner); } @@ -554,8 +571,9 @@ public class InlineModelResolver { * * @param key a unique name ofr the composed schema. * @param children the list of nested schemas within a composed schema (allOf, anyOf, oneOf). + * @param skipAllOfInlineSchemas true if allOf inline schemas need to be skipped. */ - private void flattenComposedChildren(String key, List children) { + private void flattenComposedChildren(String key, List children, boolean skipAllOfInlineSchemas) { if (children == null || children.isEmpty()) { return; } @@ -581,15 +599,19 @@ public class InlineModelResolver { // Recurse to create $refs for inner models gatherInlineModels(innerModel, innerModelName); String existing = matchGenerated(innerModel); - if (existing == null) { - innerModelName = addSchemas(innerModelName, innerModel); - Schema schema = new Schema().$ref(innerModelName); - schema.setRequired(component.getRequired()); - listIterator.set(schema); + if (!skipAllOfInlineSchemas) { + if (existing == null) { + innerModelName = addSchemas(innerModelName, innerModel); + Schema schema = new Schema().$ref(innerModelName); + schema.setRequired(component.getRequired()); + listIterator.set(schema); + } else { + Schema schema = new Schema().$ref(existing); + schema.setRequired(component.getRequired()); + listIterator.set(schema); + } } else { - Schema schema = new Schema().$ref(existing); - schema.setRequired(component.getRequired()); - listIterator.set(schema); + LOGGER.debug("Inline allOf schema {} not refactored into a separate model using $ref.", innerModelName); } } } @@ -614,9 +636,9 @@ public class InlineModelResolver { } else if (ModelUtils.isComposedSchema(model)) { ComposedSchema m = (ComposedSchema) model; // inline child schemas - flattenComposedChildren(modelName + "_allOf", m.getAllOf()); - flattenComposedChildren(modelName + "_anyOf", m.getAnyOf()); - flattenComposedChildren(modelName + "_oneOf", m.getOneOf()); + flattenComposedChildren(modelName + "_allOf", m.getAllOf(), !Boolean.TRUE.equals(this.refactorAllOfInlineSchemas)); + flattenComposedChildren(modelName + "_anyOf", m.getAnyOf(), false); + flattenComposedChildren(modelName + "_oneOf", m.getOneOf(), false); } else { gatherInlineModels(model, modelName); } 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 d4bef127c73..ec136b00cd7 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 @@ -1905,6 +1905,26 @@ public class ModelUtils { return false; } + /** + * Returns true if the schema is a parent (with discriminator). + * + * @param schema the schema. + * + * @return true if the schema is a parent. + */ + public static boolean isParent(Schema schema) { + if (schema != null && schema.getDiscriminator() != null) { + return true; + } + + // if x-parent is set + if (isExtensionParent(schema)) { + return true; + } + + return false; + } + @FunctionalInterface private interface OpenAPISchemaVisitor { 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 index c34cd38df42..e7888186200 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/InlineModelResolverTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/InlineModelResolverTest.java @@ -800,7 +800,11 @@ public class InlineModelResolverTest { ComposedSchema schema = (ComposedSchema) openAPI.getComponents().getSchemas().get("ComposedObjectModelInline"); - checkComposedChildren(openAPI, schema.getAllOf(), "allOf"); + // since 7.0.0, allOf inline sub-schemas are not created as $ref schema + assertEquals(1, schema.getAllOf().get(0).getProperties().size()); + assertNull(schema.getAllOf().get(0).get$ref()); + + // anyOf, oneOf sub-schemas are created as $ref schema by inline model resolver checkComposedChildren(openAPI, schema.getAnyOf(), "anyOf"); checkComposedChildren(openAPI, schema.getOneOf(), "oneOf"); } @@ -833,27 +837,25 @@ public class InlineModelResolverTest { ComposedSchema party = (ComposedSchema) openAPI.getComponents().getSchemas().get("Party"); List partySchemas = party.getAllOf(); Schema entity = ModelUtils.getReferencedSchema(openAPI, partySchemas.get(0)); - Schema partyAllOf = ModelUtils.getReferencedSchema(openAPI, partySchemas.get(1)); + Schema partyAllOfChildSchema = partySchemas.get(1); // get the inline schema directly assertEquals(partySchemas.get(0).get$ref(), "#/components/schemas/Entity"); - assertEquals(partySchemas.get(1).get$ref(), "#/components/schemas/Party_allOf"); + assertEquals(partySchemas.get(1).get$ref(), null); assertNull(party.getDiscriminator()); assertNull(entity.getDiscriminator()); - assertNotNull(partyAllOf.getDiscriminator()); - assertEquals(partyAllOf.getDiscriminator().getPropertyName(), "party_type"); - assertEquals(partyAllOf.getRequired().get(0), "party_type"); - + assertNotNull(partyAllOfChildSchema.getDiscriminator()); + assertEquals(partyAllOfChildSchema.getDiscriminator().getPropertyName(), "party_type"); + assertEquals(partyAllOfChildSchema.getRequired().get(0), "party_type"); // Contact ComposedSchema contact = (ComposedSchema) openAPI.getComponents().getSchemas().get("Contact"); - Schema contactAllOf = ModelUtils.getReferencedSchema(openAPI, contact.getAllOf().get(1)); + Schema contactAllOf = contact.getAllOf().get(1); // use the inline child scheam directly assertEquals(contact.getExtensions().get("x-discriminator-value"), "contact"); assertEquals(contact.getAllOf().get(0).get$ref(), "#/components/schemas/Party"); - assertEquals(contact.getAllOf().get(1).get$ref(), "#/components/schemas/Contact_allOf"); - assertNull(contactAllOf.getDiscriminator()); - + assertEquals(contact.getAllOf().get(1).get$ref(), null); + assertEquals(contactAllOf.getProperties().size(), 4); // Customer ComposedSchema customer = (ComposedSchema) openAPI.getComponents().getSchemas().get("Customer"); @@ -866,15 +868,14 @@ public class InlineModelResolverTest { // Discriminators are not defined at this level in the schema doc assertNull(customerSchemas.get(0).getDiscriminator()); - assertEquals(customerSchemas.get(1).get$ref(), "#/components/schemas/Customer_allOf"); - assertNull(customerSchemas.get(1).getDiscriminator()); + assertNull(customerSchemas.get(1).get$ref()); + assertNotNull(customerSchemas.get(1).getDiscriminator()); // Customer -> Party where Customer defines it's own discriminator assertNotNull(customerAllOf.getDiscriminator()); assertEquals(customerAllOf.getDiscriminator().getPropertyName(), "customer_type"); assertEquals(customerAllOf.getRequired().get(0), "customer_type"); - // Person ComposedSchema person = (ComposedSchema) openAPI.getComponents().getSchemas().get("Person"); List personSchemas = person.getAllOf(); @@ -883,25 +884,26 @@ public class InlineModelResolverTest { // Discriminators are not defined at this level in the schema doc assertEquals(personSchemas.get(0).get$ref(), "#/components/schemas/Customer"); assertNull(personSchemas.get(0).getDiscriminator()); - assertEquals(personSchemas.get(1).get$ref(), "#/components/schemas/Person_allOf"); + assertNull(personSchemas.get(1).get$ref()); assertNull(personSchemas.get(1).getDiscriminator()); + assertEquals(2, personSchemas.get(1).getProperties().size()); // Person -> Customer -> Party, so discriminator is not at this level assertNull(person.getDiscriminator()); assertEquals(person.getExtensions().get("x-discriminator-value"), "person"); assertNull(personAllOf.getDiscriminator()); - // Organization ComposedSchema organization = (ComposedSchema) openAPI.getComponents().getSchemas().get("Organization"); List organizationSchemas = organization.getAllOf(); - Schema organizationAllOf = ModelUtils.getReferencedSchema(openAPI, organizationSchemas.get(1)); + Schema organizationAllOf = organizationSchemas.get(1); // get the inline child schema directly // Discriminators are not defined at this level in the schema doc assertEquals(organizationSchemas.get(0).get$ref(), "#/components/schemas/Customer"); assertNull(organizationSchemas.get(0).getDiscriminator()); - assertEquals(organizationSchemas.get(1).get$ref(), "#/components/schemas/Organization_allOf"); - assertNull(organizationSchemas.get(1).getDiscriminator()); + assertNotNull(organizationAllOf); + assertNull(organizationAllOf.getDiscriminator()); + assertEquals(1, organizationAllOf.getProperties().size()); // Organization -> Customer -> Party, so discriminator is not at this level assertNull(organizationAllOf.getDiscriminator()); @@ -1097,7 +1099,9 @@ public class InlineModelResolverTest { //assertEquals("#/components/schemas/resolveInlineRequestBodyAllOf_request", requestBodyReference.get$ref()); ComposedSchema allOfModel = (ComposedSchema) openAPI.getComponents().getSchemas().get("resolveInlineRequestBodyAllOf_request"); - assertEquals("#/components/schemas/resolveInlineRequestBody_request", allOfModel.getAllOf().get(0).get$ref()); + assertEquals(null, allOfModel.getAllOf().get(0).get$ref()); + assertEquals(2, allOfModel.getAllOf().get(0).getProperties().size()); + //Schema allOfModel = ModelUtils.getReferencedSchema(openAPI, requestBodyReference.get$ref()); //RequestBody referencedRequestBody = ModelUtils.getReferencedRequestBody(openAPI, requestBodyReference); diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/JavaClientCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/JavaClientCodegenTest.java index 1d1fdf0ff10..d4e152ab2c2 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/JavaClientCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/JavaClientCodegenTest.java @@ -517,13 +517,11 @@ public class JavaClientCodegenTest { generator.setGeneratorPropertyDefault(CodegenConstants.APIS, "true"); List files = generator.opts(clientOptInput).generate(); - Assert.assertEquals(files.size(), 162); + Assert.assertEquals(files.size(), 153); validateJavaSourceFiles(files); TestUtils.assertFileContains(Paths.get(output + "/src/main/java/xyz/abcdef/model/Dog.java"), "import xyz.abcdef.invoker.JSON;"); - TestUtils.assertFileNotContains(Paths.get(output + "/src/main/java/xyz/abcdef/model/DogAllOf.java"), - "import xyz.abcdef.invoker.JSON;"); } @Test @@ -1788,7 +1786,7 @@ public class JavaClientCodegenTest { generator.setGeneratorPropertyDefault(CodegenConstants.APIS, "true"); List files = generator.opts(clientOptInput).generate(); - Assert.assertEquals(files.size(), 33); + Assert.assertEquals(files.size(), 24); validateJavaSourceFiles(files); TestUtils.assertFileContains(Paths.get(output + "/src/main/java/xyz/abcdef/model/Child.java"), diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/kotlin/jvm_volley/KotlinJvmVolleyModelCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/kotlin/jvm_volley/KotlinJvmVolleyModelCodegenTest.java index 6473e036d4d..c2700fd4d95 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/kotlin/jvm_volley/KotlinJvmVolleyModelCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/kotlin/jvm_volley/KotlinJvmVolleyModelCodegenTest.java @@ -28,8 +28,9 @@ public class KotlinJvmVolleyModelCodegenTest { String outputPath = checkModel(codegen, false); - assertFileContains(Paths.get(outputPath + "/src/main/java/models/room/BigDogRoomModel.kt"), "toApiModel()"); - assertFileContains(Paths.get(outputPath + "/src/main/java/models/BigDog.kt"), "toRoomModel()"); + // TODO need revision on how kotlin client generator handles allOf ($ref vs inline) + //assertFileContains(Paths.get(outputPath + "/src/main/java/models/room/BigDogRoomModel.kt"), "toApiModel()"); + //assertFileContains(Paths.get(outputPath + "/src/main/java/models/BigDog.kt"), "toRoomModel()"); } @Test 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 23ffd0090e9..6077d428aaa 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 @@ -60,7 +60,6 @@ public class ModelUtilsTest { "SomeObj17", "SomeObj18", "Common18", - "SomeObj18_allOf", "_some_p19_patch_request", "Obj19ByAge", "Obj19ByType", @@ -95,9 +94,7 @@ public class ModelUtilsTest { "UnusedObj4", "Parent29", "AChild29", - "BChild29", - "AChild29_allOf", - "BChild29_allOf" + "BChild29" ); Assert.assertEquals(unusedSchemas.size(), expectedUnusedSchemas.size()); Assert.assertTrue(unusedSchemas.containsAll(expectedUnusedSchemas)); diff --git a/samples/client/echo_api/java/apache-httpclient/.openapi-generator/FILES b/samples/client/echo_api/java/apache-httpclient/.openapi-generator/FILES index 89fac5b44a4..29a6dcea8fd 100644 --- a/samples/client/echo_api/java/apache-httpclient/.openapi-generator/FILES +++ b/samples/client/echo_api/java/apache-httpclient/.openapi-generator/FILES @@ -9,7 +9,6 @@ docs/Bird.md docs/BodyApi.md docs/Category.md docs/DataQuery.md -docs/DataQueryAllOf.md docs/DefaultValue.md docs/FormApi.md docs/HeaderApi.md @@ -52,7 +51,6 @@ src/main/java/org/openapitools/client/auth/HttpBearerAuth.java src/main/java/org/openapitools/client/model/Bird.java src/main/java/org/openapitools/client/model/Category.java src/main/java/org/openapitools/client/model/DataQuery.java -src/main/java/org/openapitools/client/model/DataQueryAllOf.java src/main/java/org/openapitools/client/model/DefaultValue.java src/main/java/org/openapitools/client/model/NumberPropertiesOnly.java src/main/java/org/openapitools/client/model/Pet.java diff --git a/samples/client/echo_api/java/apache-httpclient/README.md b/samples/client/echo_api/java/apache-httpclient/README.md index 961b90ea1a3..d4bb1a474ff 100644 --- a/samples/client/echo_api/java/apache-httpclient/README.md +++ b/samples/client/echo_api/java/apache-httpclient/README.md @@ -129,7 +129,6 @@ Class | Method | HTTP request | Description - [Bird](docs/Bird.md) - [Category](docs/Category.md) - [DataQuery](docs/DataQuery.md) - - [DataQueryAllOf](docs/DataQueryAllOf.md) - [DefaultValue](docs/DefaultValue.md) - [NumberPropertiesOnly](docs/NumberPropertiesOnly.md) - [Pet](docs/Pet.md) diff --git a/samples/client/echo_api/java/apache-httpclient/api/openapi.yaml b/samples/client/echo_api/java/apache-httpclient/api/openapi.yaml index 6d4d5255830..c841e9ce484 100644 --- a/samples/client/echo_api/java/apache-httpclient/api/openapi.yaml +++ b/samples/client/echo_api/java/apache-httpclient/api/openapi.yaml @@ -610,7 +610,19 @@ components: x-parent: true DataQuery: allOf: - - $ref: '#/components/schemas/DataQuery_allOf' + - properties: + suffix: + description: test suffix + type: string + text: + description: Some text containing white spaces + example: Some text + type: string + date: + description: A date + format: date-time + type: string + type: object - $ref: '#/components/schemas/Query' NumberPropertiesOnly: properties: @@ -645,19 +657,4 @@ components: allOf: - $ref: '#/components/schemas/Bird' - $ref: '#/components/schemas/Category' - DataQuery_allOf: - properties: - suffix: - description: test suffix - type: string - text: - description: Some text containing white spaces - example: Some text - type: string - date: - description: A date - format: date-time - type: string - type: object - example: null diff --git a/samples/client/echo_api/java/apache-httpclient/docs/DataQueryAllOf.md b/samples/client/echo_api/java/apache-httpclient/docs/DataQueryAllOf.md deleted file mode 100644 index cc8aa2952e9..00000000000 --- a/samples/client/echo_api/java/apache-httpclient/docs/DataQueryAllOf.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# DataQueryAllOf - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**suffix** | **String** | test suffix | [optional] | -|**text** | **String** | Some text containing white spaces | [optional] | -|**date** | **OffsetDateTime** | A date | [optional] | - - - diff --git a/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/model/DataQuery.java b/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/model/DataQuery.java index 085e41e0beb..5928aabdc23 100644 --- a/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/model/DataQuery.java +++ b/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/model/DataQuery.java @@ -217,6 +217,30 @@ public class DataQuery extends Query { StringJoiner joiner = new StringJoiner("&"); + // add `id` to the URL query string + if (getId() != null) { + try { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), "UTF-8").replaceAll("\\+", "%20"))); + } catch (UnsupportedEncodingException e) { + // Should never happen, UTF-8 is always supported + throw new RuntimeException(e); + } + } + + // add `outcomes` to the URL query string + if (getOutcomes() != null) { + for (int i = 0; i < getOutcomes().size(); i++) { + try { + joiner.add(String.format("%soutcomes%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode(String.valueOf(getOutcomes().get(i)), "UTF-8").replaceAll("\\+", "%20"))); + } catch (UnsupportedEncodingException e) { + // Should never happen, UTF-8 is always supported + throw new RuntimeException(e); + } + } + } + // add `suffix` to the URL query string if (getSuffix() != null) { try { @@ -247,30 +271,6 @@ public class DataQuery extends Query { } } - // add `id` to the URL query string - if (getId() != null) { - try { - joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), "UTF-8").replaceAll("\\+", "%20"))); - } catch (UnsupportedEncodingException e) { - // Should never happen, UTF-8 is always supported - throw new RuntimeException(e); - } - } - - // add `outcomes` to the URL query string - if (getOutcomes() != null) { - for (int i = 0; i < getOutcomes().size(); i++) { - try { - joiner.add(String.format("%soutcomes%s%s=%s", prefix, suffix, - "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), - URLEncoder.encode(String.valueOf(getOutcomes().get(i)), "UTF-8").replaceAll("\\+", "%20"))); - } catch (UnsupportedEncodingException e) { - // Should never happen, UTF-8 is always supported - throw new RuntimeException(e); - } - } - } - return joiner.toString(); } diff --git a/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/model/DataQueryAllOf.java b/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/model/DataQueryAllOf.java deleted file mode 100644 index e6992f37fe1..00000000000 --- a/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/model/DataQueryAllOf.java +++ /dev/null @@ -1,237 +0,0 @@ -/* - * Echo Server API - * Echo Server API - * - * The version of the OpenAPI document: 0.1.0 - * Contact: team@openapitools.org - * - * 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.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import java.time.OffsetDateTime; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.io.UnsupportedEncodingException; -import java.net.URLEncoder; -import java.util.StringJoiner; - -/** - * DataQueryAllOf - */ -@JsonPropertyOrder({ - DataQueryAllOf.JSON_PROPERTY_SUFFIX, - DataQueryAllOf.JSON_PROPERTY_TEXT, - DataQueryAllOf.JSON_PROPERTY_DATE -}) -@JsonTypeName("DataQuery_allOf") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DataQueryAllOf { - public static final String JSON_PROPERTY_SUFFIX = "suffix"; - private String suffix; - - public static final String JSON_PROPERTY_TEXT = "text"; - private String text; - - public static final String JSON_PROPERTY_DATE = "date"; - private OffsetDateTime date; - - public DataQueryAllOf() { - } - - public DataQueryAllOf suffix(String suffix) { - - this.suffix = suffix; - return this; - } - - /** - * test suffix - * @return suffix - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SUFFIX) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getSuffix() { - return suffix; - } - - - @JsonProperty(JSON_PROPERTY_SUFFIX) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSuffix(String suffix) { - this.suffix = suffix; - } - - - public DataQueryAllOf text(String text) { - - this.text = text; - return this; - } - - /** - * Some text containing white spaces - * @return text - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TEXT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getText() { - return text; - } - - - @JsonProperty(JSON_PROPERTY_TEXT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setText(String text) { - this.text = text; - } - - - public DataQueryAllOf date(OffsetDateTime date) { - - this.date = date; - return this; - } - - /** - * A date - * @return date - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public OffsetDateTime getDate() { - return date; - } - - - @JsonProperty(JSON_PROPERTY_DATE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDate(OffsetDateTime date) { - this.date = date; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DataQueryAllOf dataQueryAllOf = (DataQueryAllOf) o; - return Objects.equals(this.suffix, dataQueryAllOf.suffix) && - Objects.equals(this.text, dataQueryAllOf.text) && - Objects.equals(this.date, dataQueryAllOf.date); - } - - @Override - public int hashCode() { - return Objects.hash(suffix, text, date); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DataQueryAllOf {\n"); - sb.append(" suffix: ").append(toIndentedString(suffix)).append("\n"); - sb.append(" text: ").append(toIndentedString(text)).append("\n"); - sb.append(" date: ").append(toIndentedString(date)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - /** - * Convert the instance into URL query string. - * - * @return URL query string - */ - public String toUrlQueryString() { - return toUrlQueryString(null); - } - - /** - * Convert the instance into URL query string. - * - * @param prefix prefix of the query string - * @return URL query string - */ - public String toUrlQueryString(String prefix) { - String suffix = ""; - String containerSuffix = ""; - String containerPrefix = ""; - if (prefix == null) { - // style=form, explode=true, e.g. /pet?name=cat&type=manx - prefix = ""; - } else { - // deepObject style e.g. /pet?id[name]=cat&id[type]=manx - prefix = prefix + "["; - suffix = "]"; - containerSuffix = "]"; - containerPrefix = "["; - } - - StringJoiner joiner = new StringJoiner("&"); - - // add `suffix` to the URL query string - if (getSuffix() != null) { - try { - joiner.add(String.format("%ssuffix%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSuffix()), "UTF-8").replaceAll("\\+", "%20"))); - } catch (UnsupportedEncodingException e) { - // Should never happen, UTF-8 is always supported - throw new RuntimeException(e); - } - } - - // add `text` to the URL query string - if (getText() != null) { - try { - joiner.add(String.format("%stext%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getText()), "UTF-8").replaceAll("\\+", "%20"))); - } catch (UnsupportedEncodingException e) { - // Should never happen, UTF-8 is always supported - throw new RuntimeException(e); - } - } - - // add `date` to the URL query string - if (getDate() != null) { - try { - joiner.add(String.format("%sdate%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDate()), "UTF-8").replaceAll("\\+", "%20"))); - } catch (UnsupportedEncodingException e) { - // Should never happen, UTF-8 is always supported - throw new RuntimeException(e); - } - } - - return joiner.toString(); - } - -} - diff --git a/samples/client/echo_api/java/apache-httpclient/src/test/java/org/openapitools/client/CustomTest.java b/samples/client/echo_api/java/apache-httpclient/src/test/java/org/openapitools/client/CustomTest.java index 8d85fe88e4b..ecb8c5b6605 100644 --- a/samples/client/echo_api/java/apache-httpclient/src/test/java/org/openapitools/client/CustomTest.java +++ b/samples/client/echo_api/java/apache-httpclient/src/test/java/org/openapitools/client/CustomTest.java @@ -120,7 +120,7 @@ public class CustomTest { String response = api.testQueryStyleFormExplodeTrueObjectAllOf(queryObject); org.openapitools.client.EchoServerResponseParser p = new org.openapitools.client.EchoServerResponseParser(response); - Assert.assertEquals("/query/style_form/explode_true/object/allOf?text=Hello%20World&id=3487&outcomes=SKIPPED&outcomes=FAILURE", p.path); + Assert.assertEquals("/query/style_form/explode_true/object/allOf?id=3487&outcomes=SKIPPED&outcomes=FAILURE&text=Hello%20World", p.path); } /** diff --git a/samples/client/echo_api/java/apache-httpclient/src/test/java/org/openapitools/client/model/DataQueryAllOfTest.java b/samples/client/echo_api/java/apache-httpclient/src/test/java/org/openapitools/client/model/DataQueryAllOfTest.java deleted file mode 100644 index 8a1afad2563..00000000000 --- a/samples/client/echo_api/java/apache-httpclient/src/test/java/org/openapitools/client/model/DataQueryAllOfTest.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Echo Server API - * Echo Server API - * - * The version of the OpenAPI document: 0.1.0 - * Contact: team@openapitools.org - * - * 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.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import java.time.OffsetDateTime; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for DataQueryAllOf - */ -public class DataQueryAllOfTest { - private final DataQueryAllOf model = new DataQueryAllOf(); - - /** - * Model tests for DataQueryAllOf - */ - @Test - public void testDataQueryAllOf() { - // TODO: test DataQueryAllOf - } - - /** - * Test the property 'text' - */ - @Test - public void textTest() { - // TODO: test text - } - - /** - * Test the property 'date' - */ - @Test - public void dateTest() { - // TODO: test date - } - -} diff --git a/samples/client/echo_api/java/feign-gson/.openapi-generator/FILES b/samples/client/echo_api/java/feign-gson/.openapi-generator/FILES index d5dbc5f00cc..44d56af6f1f 100644 --- a/samples/client/echo_api/java/feign-gson/.openapi-generator/FILES +++ b/samples/client/echo_api/java/feign-gson/.openapi-generator/FILES @@ -31,7 +31,6 @@ src/main/java/org/openapitools/client/model/ApiResponse.java src/main/java/org/openapitools/client/model/Bird.java src/main/java/org/openapitools/client/model/Category.java src/main/java/org/openapitools/client/model/DataQuery.java -src/main/java/org/openapitools/client/model/DataQueryAllOf.java src/main/java/org/openapitools/client/model/DefaultValue.java src/main/java/org/openapitools/client/model/NumberPropertiesOnly.java src/main/java/org/openapitools/client/model/Pet.java diff --git a/samples/client/echo_api/java/feign-gson/api/openapi.yaml b/samples/client/echo_api/java/feign-gson/api/openapi.yaml index 6d4d5255830..c841e9ce484 100644 --- a/samples/client/echo_api/java/feign-gson/api/openapi.yaml +++ b/samples/client/echo_api/java/feign-gson/api/openapi.yaml @@ -610,7 +610,19 @@ components: x-parent: true DataQuery: allOf: - - $ref: '#/components/schemas/DataQuery_allOf' + - properties: + suffix: + description: test suffix + type: string + text: + description: Some text containing white spaces + example: Some text + type: string + date: + description: A date + format: date-time + type: string + type: object - $ref: '#/components/schemas/Query' NumberPropertiesOnly: properties: @@ -645,19 +657,4 @@ components: allOf: - $ref: '#/components/schemas/Bird' - $ref: '#/components/schemas/Category' - DataQuery_allOf: - properties: - suffix: - description: test suffix - type: string - text: - description: Some text containing white spaces - example: Some text - type: string - date: - description: A date - format: date-time - type: string - type: object - example: null diff --git a/samples/client/echo_api/java/feign-gson/src/main/java/org/openapitools/client/model/DataQueryAllOf.java b/samples/client/echo_api/java/feign-gson/src/main/java/org/openapitools/client/model/DataQueryAllOf.java deleted file mode 100644 index f915fdb2994..00000000000 --- a/samples/client/echo_api/java/feign-gson/src/main/java/org/openapitools/client/model/DataQueryAllOf.java +++ /dev/null @@ -1,153 +0,0 @@ -/* - * Echo Server API - * Echo Server API - * - * The version of the OpenAPI document: 0.1.0 - * Contact: team@openapitools.org - * - * 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.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; - -/** - * DataQueryAllOf - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DataQueryAllOf { - public static final String SERIALIZED_NAME_SUFFIX = "suffix"; - @SerializedName(SERIALIZED_NAME_SUFFIX) - private String suffix; - - public static final String SERIALIZED_NAME_TEXT = "text"; - @SerializedName(SERIALIZED_NAME_TEXT) - private String text; - - public static final String SERIALIZED_NAME_DATE = "date"; - @SerializedName(SERIALIZED_NAME_DATE) - private OffsetDateTime date; - - public DataQueryAllOf() { - } - - public DataQueryAllOf suffix(String suffix) { - - this.suffix = suffix; - return this; - } - - /** - * test suffix - * @return suffix - **/ - @javax.annotation.Nullable - - public String getSuffix() { - return suffix; - } - - - public void setSuffix(String suffix) { - this.suffix = suffix; - } - - - public DataQueryAllOf text(String text) { - - this.text = text; - return this; - } - - /** - * Some text containing white spaces - * @return text - **/ - @javax.annotation.Nullable - - public String getText() { - return text; - } - - - public void setText(String text) { - this.text = text; - } - - - public DataQueryAllOf date(OffsetDateTime date) { - - this.date = date; - return this; - } - - /** - * A date - * @return date - **/ - @javax.annotation.Nullable - - public OffsetDateTime getDate() { - return date; - } - - - public void setDate(OffsetDateTime date) { - this.date = date; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DataQueryAllOf dataQueryAllOf = (DataQueryAllOf) o; - return Objects.equals(this.suffix, dataQueryAllOf.suffix) && - Objects.equals(this.text, dataQueryAllOf.text) && - Objects.equals(this.date, dataQueryAllOf.date); - } - - @Override - public int hashCode() { - return Objects.hash(suffix, text, date); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DataQueryAllOf {\n"); - sb.append(" suffix: ").append(toIndentedString(suffix)).append("\n"); - sb.append(" text: ").append(toIndentedString(text)).append("\n"); - sb.append(" date: ").append(toIndentedString(date)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/echo_api/java/feign-gson/src/test/java/org/openapitools/client/model/DataQueryAllOfTest.java b/samples/client/echo_api/java/feign-gson/src/test/java/org/openapitools/client/model/DataQueryAllOfTest.java deleted file mode 100644 index b782d973aba..00000000000 --- a/samples/client/echo_api/java/feign-gson/src/test/java/org/openapitools/client/model/DataQueryAllOfTest.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Echo Server API - * Echo Server API - * - * The version of the OpenAPI document: 0.1.0 - * Contact: team@openapitools.org - * - * 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.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; - - -/** - * Model tests for DataQueryAllOf - */ -class DataQueryAllOfTest { - private final DataQueryAllOf model = new DataQueryAllOf(); - - /** - * Model tests for DataQueryAllOf - */ - @Test - void testDataQueryAllOf() { - // TODO: test DataQueryAllOf - } - - /** - * Test the property 'text' - */ - @Test - void textTest() { - // TODO: test text - } - - /** - * Test the property 'date' - */ - @Test - void dateTest() { - // TODO: test date - } - -} diff --git a/samples/client/echo_api/java/native/.openapi-generator/FILES b/samples/client/echo_api/java/native/.openapi-generator/FILES index 231f7bb0e54..84c51355f68 100644 --- a/samples/client/echo_api/java/native/.openapi-generator/FILES +++ b/samples/client/echo_api/java/native/.openapi-generator/FILES @@ -9,7 +9,6 @@ docs/Bird.md docs/BodyApi.md docs/Category.md docs/DataQuery.md -docs/DataQueryAllOf.md docs/DefaultValue.md docs/FormApi.md docs/HeaderApi.md @@ -49,7 +48,6 @@ src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java src/main/java/org/openapitools/client/model/Bird.java src/main/java/org/openapitools/client/model/Category.java src/main/java/org/openapitools/client/model/DataQuery.java -src/main/java/org/openapitools/client/model/DataQueryAllOf.java src/main/java/org/openapitools/client/model/DefaultValue.java src/main/java/org/openapitools/client/model/NumberPropertiesOnly.java src/main/java/org/openapitools/client/model/Pet.java diff --git a/samples/client/echo_api/java/native/README.md b/samples/client/echo_api/java/native/README.md index 12ae8301156..bfc4c833152 100644 --- a/samples/client/echo_api/java/native/README.md +++ b/samples/client/echo_api/java/native/README.md @@ -145,7 +145,6 @@ Class | Method | HTTP request | Description - [Bird](docs/Bird.md) - [Category](docs/Category.md) - [DataQuery](docs/DataQuery.md) - - [DataQueryAllOf](docs/DataQueryAllOf.md) - [DefaultValue](docs/DefaultValue.md) - [NumberPropertiesOnly](docs/NumberPropertiesOnly.md) - [Pet](docs/Pet.md) diff --git a/samples/client/echo_api/java/native/api/openapi.yaml b/samples/client/echo_api/java/native/api/openapi.yaml index 6d4d5255830..c841e9ce484 100644 --- a/samples/client/echo_api/java/native/api/openapi.yaml +++ b/samples/client/echo_api/java/native/api/openapi.yaml @@ -610,7 +610,19 @@ components: x-parent: true DataQuery: allOf: - - $ref: '#/components/schemas/DataQuery_allOf' + - properties: + suffix: + description: test suffix + type: string + text: + description: Some text containing white spaces + example: Some text + type: string + date: + description: A date + format: date-time + type: string + type: object - $ref: '#/components/schemas/Query' NumberPropertiesOnly: properties: @@ -645,19 +657,4 @@ components: allOf: - $ref: '#/components/schemas/Bird' - $ref: '#/components/schemas/Category' - DataQuery_allOf: - properties: - suffix: - description: test suffix - type: string - text: - description: Some text containing white spaces - example: Some text - type: string - date: - description: A date - format: date-time - type: string - type: object - example: null diff --git a/samples/client/echo_api/java/native/docs/DataQueryAllOf.md b/samples/client/echo_api/java/native/docs/DataQueryAllOf.md deleted file mode 100644 index cc8aa2952e9..00000000000 --- a/samples/client/echo_api/java/native/docs/DataQueryAllOf.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# DataQueryAllOf - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**suffix** | **String** | test suffix | [optional] | -|**text** | **String** | Some text containing white spaces | [optional] | -|**date** | **OffsetDateTime** | A date | [optional] | - - - diff --git a/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/model/DataQuery.java b/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/model/DataQuery.java index f38b803dc81..101a95291e1 100644 --- a/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/model/DataQuery.java +++ b/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/model/DataQuery.java @@ -219,6 +219,20 @@ public class DataQuery extends Query { StringJoiner joiner = new StringJoiner("&"); + // add `id` to the URL query string + if (getId() != null) { + joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + + // add `outcomes` to the URL query string + if (getOutcomes() != null) { + for (int i = 0; i < getOutcomes().size(); i++) { + joiner.add(String.format("%soutcomes%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode(String.valueOf(getOutcomes().get(i)), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + } + } + // add `suffix` to the URL query string if (getSuffix() != null) { joiner.add(String.format("%ssuffix%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSuffix()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); @@ -234,20 +248,6 @@ public class DataQuery extends Query { joiner.add(String.format("%sdate%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDate()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); } - // add `id` to the URL query string - if (getId() != null) { - joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); - } - - // add `outcomes` to the URL query string - if (getOutcomes() != null) { - for (int i = 0; i < getOutcomes().size(); i++) { - joiner.add(String.format("%soutcomes%s%s=%s", prefix, suffix, - "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), - URLEncoder.encode(String.valueOf(getOutcomes().get(i)), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); - } - } - return joiner.toString(); } } diff --git a/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/model/DataQueryAllOf.java b/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/model/DataQueryAllOf.java deleted file mode 100644 index 16f726a615b..00000000000 --- a/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/model/DataQueryAllOf.java +++ /dev/null @@ -1,223 +0,0 @@ -/* - * Echo Server API - * Echo Server API - * - * The version of the OpenAPI document: 0.1.0 - * Contact: team@openapitools.org - * - * 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.client.model; - -import java.net.URLEncoder; -import java.nio.charset.StandardCharsets; -import java.util.StringJoiner; -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import java.time.OffsetDateTime; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - - -/** - * DataQueryAllOf - */ -@JsonPropertyOrder({ - DataQueryAllOf.JSON_PROPERTY_SUFFIX, - DataQueryAllOf.JSON_PROPERTY_TEXT, - DataQueryAllOf.JSON_PROPERTY_DATE -}) -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DataQueryAllOf { - public static final String JSON_PROPERTY_SUFFIX = "suffix"; - private String suffix; - - public static final String JSON_PROPERTY_TEXT = "text"; - private String text; - - public static final String JSON_PROPERTY_DATE = "date"; - private OffsetDateTime date; - - public DataQueryAllOf() { - } - - public DataQueryAllOf suffix(String suffix) { - this.suffix = suffix; - return this; - } - - /** - * test suffix - * @return suffix - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SUFFIX) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getSuffix() { - return suffix; - } - - - @JsonProperty(JSON_PROPERTY_SUFFIX) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSuffix(String suffix) { - this.suffix = suffix; - } - - - public DataQueryAllOf text(String text) { - this.text = text; - return this; - } - - /** - * Some text containing white spaces - * @return text - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TEXT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getText() { - return text; - } - - - @JsonProperty(JSON_PROPERTY_TEXT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setText(String text) { - this.text = text; - } - - - public DataQueryAllOf date(OffsetDateTime date) { - this.date = date; - return this; - } - - /** - * A date - * @return date - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public OffsetDateTime getDate() { - return date; - } - - - @JsonProperty(JSON_PROPERTY_DATE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDate(OffsetDateTime date) { - this.date = date; - } - - - /** - * Return true if this DataQuery_allOf object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DataQueryAllOf dataQueryAllOf = (DataQueryAllOf) o; - return Objects.equals(this.suffix, dataQueryAllOf.suffix) && - Objects.equals(this.text, dataQueryAllOf.text) && - Objects.equals(this.date, dataQueryAllOf.date); - } - - @Override - public int hashCode() { - return Objects.hash(suffix, text, date); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DataQueryAllOf {\n"); - sb.append(" suffix: ").append(toIndentedString(suffix)).append("\n"); - sb.append(" text: ").append(toIndentedString(text)).append("\n"); - sb.append(" date: ").append(toIndentedString(date)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - /** - * Convert the instance into URL query string. - * - * @return URL query string - */ - public String toUrlQueryString() { - return toUrlQueryString(null); - } - - /** - * Convert the instance into URL query string. - * - * @param prefix prefix of the query string - * @return URL query string - */ - public String toUrlQueryString(String prefix) { - String suffix = ""; - String containerSuffix = ""; - String containerPrefix = ""; - if (prefix == null) { - // style=form, explode=true, e.g. /pet?name=cat&type=manx - prefix = ""; - } else { - // deepObject style e.g. /pet?id[name]=cat&id[type]=manx - prefix = prefix + "["; - suffix = "]"; - containerSuffix = "]"; - containerPrefix = "["; - } - - StringJoiner joiner = new StringJoiner("&"); - - // add `suffix` to the URL query string - if (getSuffix() != null) { - joiner.add(String.format("%ssuffix%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getSuffix()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); - } - - // add `text` to the URL query string - if (getText() != null) { - joiner.add(String.format("%stext%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getText()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); - } - - // add `date` to the URL query string - if (getDate() != null) { - joiner.add(String.format("%sdate%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDate()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); - } - - return joiner.toString(); - } -} - diff --git a/samples/client/echo_api/java/native/src/test/java/org/openapitools/client/CustomTest.java b/samples/client/echo_api/java/native/src/test/java/org/openapitools/client/CustomTest.java index 0ce6a0ff875..aa519bd284d 100644 --- a/samples/client/echo_api/java/native/src/test/java/org/openapitools/client/CustomTest.java +++ b/samples/client/echo_api/java/native/src/test/java/org/openapitools/client/CustomTest.java @@ -88,7 +88,7 @@ public class CustomTest { String response = api.testQueryStyleFormExplodeTrueObjectAllOf(queryObject); org.openapitools.client.EchoServerResponseParser p = new org.openapitools.client.EchoServerResponseParser(response); - Assert.assertEquals("/query/style_form/explode_true/object/allOf?text=Hello%20World&id=3487&outcomes=SKIPPED&outcomes=FAILURE", p.path); + Assert.assertEquals("/query/style_form/explode_true/object/allOf?id=3487&outcomes=SKIPPED&outcomes=FAILURE&text=Hello%20World", p.path); } /** diff --git a/samples/client/echo_api/java/native/src/test/java/org/openapitools/client/model/DataQueryAllOfTest.java b/samples/client/echo_api/java/native/src/test/java/org/openapitools/client/model/DataQueryAllOfTest.java deleted file mode 100644 index 8a1afad2563..00000000000 --- a/samples/client/echo_api/java/native/src/test/java/org/openapitools/client/model/DataQueryAllOfTest.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Echo Server API - * Echo Server API - * - * The version of the OpenAPI document: 0.1.0 - * Contact: team@openapitools.org - * - * 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.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import java.time.OffsetDateTime; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for DataQueryAllOf - */ -public class DataQueryAllOfTest { - private final DataQueryAllOf model = new DataQueryAllOf(); - - /** - * Model tests for DataQueryAllOf - */ - @Test - public void testDataQueryAllOf() { - // TODO: test DataQueryAllOf - } - - /** - * Test the property 'text' - */ - @Test - public void textTest() { - // TODO: test text - } - - /** - * Test the property 'date' - */ - @Test - public void dateTest() { - // TODO: test date - } - -} diff --git a/samples/client/echo_api/java/okhttp-gson/.openapi-generator/FILES b/samples/client/echo_api/java/okhttp-gson/.openapi-generator/FILES index e1eb9213fc4..d42a72b3684 100644 --- a/samples/client/echo_api/java/okhttp-gson/.openapi-generator/FILES +++ b/samples/client/echo_api/java/okhttp-gson/.openapi-generator/FILES @@ -9,7 +9,6 @@ docs/Bird.md docs/BodyApi.md docs/Category.md docs/DataQuery.md -docs/DataQueryAllOf.md docs/DefaultValue.md docs/FormApi.md docs/HeaderApi.md @@ -57,7 +56,6 @@ src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java src/main/java/org/openapitools/client/model/Bird.java src/main/java/org/openapitools/client/model/Category.java src/main/java/org/openapitools/client/model/DataQuery.java -src/main/java/org/openapitools/client/model/DataQueryAllOf.java src/main/java/org/openapitools/client/model/DefaultValue.java src/main/java/org/openapitools/client/model/NumberPropertiesOnly.java src/main/java/org/openapitools/client/model/Pet.java diff --git a/samples/client/echo_api/java/okhttp-gson/README.md b/samples/client/echo_api/java/okhttp-gson/README.md index bd2837dbb59..cee3f677387 100644 --- a/samples/client/echo_api/java/okhttp-gson/README.md +++ b/samples/client/echo_api/java/okhttp-gson/README.md @@ -136,7 +136,6 @@ Class | Method | HTTP request | Description - [Bird](docs/Bird.md) - [Category](docs/Category.md) - [DataQuery](docs/DataQuery.md) - - [DataQueryAllOf](docs/DataQueryAllOf.md) - [DefaultValue](docs/DefaultValue.md) - [NumberPropertiesOnly](docs/NumberPropertiesOnly.md) - [Pet](docs/Pet.md) diff --git a/samples/client/echo_api/java/okhttp-gson/api/openapi.yaml b/samples/client/echo_api/java/okhttp-gson/api/openapi.yaml index 6d4d5255830..c841e9ce484 100644 --- a/samples/client/echo_api/java/okhttp-gson/api/openapi.yaml +++ b/samples/client/echo_api/java/okhttp-gson/api/openapi.yaml @@ -610,7 +610,19 @@ components: x-parent: true DataQuery: allOf: - - $ref: '#/components/schemas/DataQuery_allOf' + - properties: + suffix: + description: test suffix + type: string + text: + description: Some text containing white spaces + example: Some text + type: string + date: + description: A date + format: date-time + type: string + type: object - $ref: '#/components/schemas/Query' NumberPropertiesOnly: properties: @@ -645,19 +657,4 @@ components: allOf: - $ref: '#/components/schemas/Bird' - $ref: '#/components/schemas/Category' - DataQuery_allOf: - properties: - suffix: - description: test suffix - type: string - text: - description: Some text containing white spaces - example: Some text - type: string - date: - description: A date - format: date-time - type: string - type: object - example: null diff --git a/samples/client/echo_api/java/okhttp-gson/docs/DataQueryAllOf.md b/samples/client/echo_api/java/okhttp-gson/docs/DataQueryAllOf.md deleted file mode 100644 index cc8aa2952e9..00000000000 --- a/samples/client/echo_api/java/okhttp-gson/docs/DataQueryAllOf.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# DataQueryAllOf - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**suffix** | **String** | test suffix | [optional] | -|**text** | **String** | Some text containing white spaces | [optional] | -|**date** | **OffsetDateTime** | A date | [optional] | - - - diff --git a/samples/client/echo_api/java/okhttp-gson/src/main/java/org/openapitools/client/JSON.java b/samples/client/echo_api/java/okhttp-gson/src/main/java/org/openapitools/client/JSON.java index 36fe90437a1..65e1121927d 100644 --- a/samples/client/echo_api/java/okhttp-gson/src/main/java/org/openapitools/client/JSON.java +++ b/samples/client/echo_api/java/okhttp-gson/src/main/java/org/openapitools/client/JSON.java @@ -96,7 +96,6 @@ public class JSON { gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Bird.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Category.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.DataQuery.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.DataQueryAllOf.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.DefaultValue.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.NumberPropertiesOnly.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Pet.CustomTypeAdapterFactory()); diff --git a/samples/client/echo_api/java/okhttp-gson/src/main/java/org/openapitools/client/model/DataQuery.java b/samples/client/echo_api/java/okhttp-gson/src/main/java/org/openapitools/client/model/DataQuery.java index 0038b72a2e0..acc697cb904 100644 --- a/samples/client/echo_api/java/okhttp-gson/src/main/java/org/openapitools/client/model/DataQuery.java +++ b/samples/client/echo_api/java/okhttp-gson/src/main/java/org/openapitools/client/model/DataQuery.java @@ -185,11 +185,11 @@ public class DataQuery extends Query { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("outcomes"); openapiFields.add("suffix"); openapiFields.add("text"); openapiFields.add("date"); - openapiFields.add("id"); - openapiFields.add("outcomes"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); diff --git a/samples/client/echo_api/java/okhttp-gson/src/main/java/org/openapitools/client/model/DataQueryAllOf.java b/samples/client/echo_api/java/okhttp-gson/src/main/java/org/openapitools/client/model/DataQueryAllOf.java deleted file mode 100644 index 694e962ad96..00000000000 --- a/samples/client/echo_api/java/okhttp-gson/src/main/java/org/openapitools/client/model/DataQueryAllOf.java +++ /dev/null @@ -1,268 +0,0 @@ -/* - * Echo Server API - * Echo Server API - * - * The version of the OpenAPI document: 0.1.0 - * Contact: team@openapitools.org - * - * 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.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * DataQueryAllOf - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DataQueryAllOf { - public static final String SERIALIZED_NAME_SUFFIX = "suffix"; - @SerializedName(SERIALIZED_NAME_SUFFIX) - private String suffix; - - public static final String SERIALIZED_NAME_TEXT = "text"; - @SerializedName(SERIALIZED_NAME_TEXT) - private String text; - - public static final String SERIALIZED_NAME_DATE = "date"; - @SerializedName(SERIALIZED_NAME_DATE) - private OffsetDateTime date; - - public DataQueryAllOf() { - } - - public DataQueryAllOf suffix(String suffix) { - - this.suffix = suffix; - return this; - } - - /** - * test suffix - * @return suffix - **/ - @javax.annotation.Nullable - public String getSuffix() { - return suffix; - } - - - public void setSuffix(String suffix) { - this.suffix = suffix; - } - - - public DataQueryAllOf text(String text) { - - this.text = text; - return this; - } - - /** - * Some text containing white spaces - * @return text - **/ - @javax.annotation.Nullable - public String getText() { - return text; - } - - - public void setText(String text) { - this.text = text; - } - - - public DataQueryAllOf date(OffsetDateTime date) { - - this.date = date; - return this; - } - - /** - * A date - * @return date - **/ - @javax.annotation.Nullable - public OffsetDateTime getDate() { - return date; - } - - - public void setDate(OffsetDateTime date) { - this.date = date; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DataQueryAllOf dataQueryAllOf = (DataQueryAllOf) o; - return Objects.equals(this.suffix, dataQueryAllOf.suffix) && - Objects.equals(this.text, dataQueryAllOf.text) && - Objects.equals(this.date, dataQueryAllOf.date); - } - - @Override - public int hashCode() { - return Objects.hash(suffix, text, date); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DataQueryAllOf {\n"); - sb.append(" suffix: ").append(toIndentedString(suffix)).append("\n"); - sb.append(" text: ").append(toIndentedString(text)).append("\n"); - sb.append(" date: ").append(toIndentedString(date)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("suffix"); - openapiFields.add("text"); - openapiFields.add("date"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to DataQueryAllOf - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DataQueryAllOf.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in DataQueryAllOf is not found in the empty JSON string", DataQueryAllOf.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DataQueryAllOf.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `DataQueryAllOf` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("suffix") != null && !jsonObj.get("suffix").isJsonNull()) && !jsonObj.get("suffix").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `suffix` to be a primitive type in the JSON string but got `%s`", jsonObj.get("suffix").toString())); - } - if ((jsonObj.get("text") != null && !jsonObj.get("text").isJsonNull()) && !jsonObj.get("text").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DataQueryAllOf.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DataQueryAllOf' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(DataQueryAllOf.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, DataQueryAllOf value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DataQueryAllOf read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of DataQueryAllOf given an JSON string - * - * @param jsonString JSON string - * @return An instance of DataQueryAllOf - * @throws IOException if the JSON string is invalid with respect to DataQueryAllOf - */ - public static DataQueryAllOf fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DataQueryAllOf.class); - } - - /** - * Convert an instance of DataQueryAllOf to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/samples/client/echo_api/java/okhttp-gson/src/test/java/org/openapitools/client/model/DataQueryAllOfTest.java b/samples/client/echo_api/java/okhttp-gson/src/test/java/org/openapitools/client/model/DataQueryAllOfTest.java deleted file mode 100644 index 7165591ae6d..00000000000 --- a/samples/client/echo_api/java/okhttp-gson/src/test/java/org/openapitools/client/model/DataQueryAllOfTest.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Echo Server API - * Echo Server API - * - * The version of the OpenAPI document: 0.1.0 - * Contact: team@openapitools.org - * - * 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.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - - -/** - * Model tests for DataQueryAllOf - */ -public class DataQueryAllOfTest { - private final DataQueryAllOf model = new DataQueryAllOf(); - - /** - * Model tests for DataQueryAllOf - */ - @Test - public void testDataQueryAllOf() { - // TODO: test DataQueryAllOf - } - - /** - * Test the property 'text' - */ - @Test - public void textTest() { - // TODO: test text - } - - /** - * Test the property 'date' - */ - @Test - public void dateTest() { - // TODO: test date - } - -} diff --git a/samples/client/echo_api/python/.openapi-generator/FILES b/samples/client/echo_api/python/.openapi-generator/FILES index e6f74991cf2..58dbe77b172 100644 --- a/samples/client/echo_api/python/.openapi-generator/FILES +++ b/samples/client/echo_api/python/.openapi-generator/FILES @@ -7,7 +7,6 @@ docs/Bird.md docs/BodyApi.md docs/Category.md docs/DataQuery.md -docs/DataQueryAllOf.md docs/DefaultValue.md docs/FormApi.md docs/HeaderApi.md @@ -36,7 +35,6 @@ openapi_client/models/__init__.py openapi_client/models/bird.py openapi_client/models/category.py openapi_client/models/data_query.py -openapi_client/models/data_query_all_of.py openapi_client/models/default_value.py openapi_client/models/number_properties_only.py openapi_client/models/pet.py diff --git a/samples/client/echo_api/python/README.md b/samples/client/echo_api/python/README.md index 5cf4e4ae604..9fdfe8311bc 100644 --- a/samples/client/echo_api/python/README.md +++ b/samples/client/echo_api/python/README.md @@ -108,7 +108,6 @@ Class | Method | HTTP request | Description - [Bird](docs/Bird.md) - [Category](docs/Category.md) - [DataQuery](docs/DataQuery.md) - - [DataQueryAllOf](docs/DataQueryAllOf.md) - [DefaultValue](docs/DefaultValue.md) - [NumberPropertiesOnly](docs/NumberPropertiesOnly.md) - [Pet](docs/Pet.md) diff --git a/samples/client/echo_api/python/docs/DataQueryAllOf.md b/samples/client/echo_api/python/docs/DataQueryAllOf.md deleted file mode 100644 index 524035a6de5..00000000000 --- a/samples/client/echo_api/python/docs/DataQueryAllOf.md +++ /dev/null @@ -1,30 +0,0 @@ -# DataQueryAllOf - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**suffix** | **str** | test suffix | [optional] -**text** | **str** | Some text containing white spaces | [optional] -**var_date** | **datetime** | A date | [optional] - -## Example - -```python -from openapi_client.models.data_query_all_of import DataQueryAllOf - -# TODO update the JSON string below -json = "{}" -# create an instance of DataQueryAllOf from a JSON string -data_query_all_of_instance = DataQueryAllOf.from_json(json) -# print the JSON string representation of the object -print DataQueryAllOf.to_json() - -# convert the object into a dict -data_query_all_of_dict = data_query_all_of_instance.to_dict() -# create an instance of DataQueryAllOf from a dict -data_query_all_of_form_dict = data_query_all_of.from_dict(data_query_all_of_dict) -``` -[[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/echo_api/python/openapi_client/__init__.py b/samples/client/echo_api/python/openapi_client/__init__.py index 27f67899c01..083766dbf30 100644 --- a/samples/client/echo_api/python/openapi_client/__init__.py +++ b/samples/client/echo_api/python/openapi_client/__init__.py @@ -39,7 +39,6 @@ from openapi_client.exceptions import ApiException from openapi_client.models.bird import Bird from openapi_client.models.category import Category from openapi_client.models.data_query import DataQuery -from openapi_client.models.data_query_all_of import DataQueryAllOf from openapi_client.models.default_value import DefaultValue from openapi_client.models.number_properties_only import NumberPropertiesOnly from openapi_client.models.pet import Pet diff --git a/samples/client/echo_api/python/openapi_client/models/__init__.py b/samples/client/echo_api/python/openapi_client/models/__init__.py index 2489f30be85..628866c97f0 100644 --- a/samples/client/echo_api/python/openapi_client/models/__init__.py +++ b/samples/client/echo_api/python/openapi_client/models/__init__.py @@ -18,7 +18,6 @@ from openapi_client.models.bird import Bird from openapi_client.models.category import Category from openapi_client.models.data_query import DataQuery -from openapi_client.models.data_query_all_of import DataQueryAllOf from openapi_client.models.default_value import DefaultValue from openapi_client.models.number_properties_only import NumberPropertiesOnly from openapi_client.models.pet import Pet diff --git a/samples/client/echo_api/python/openapi_client/models/data_query.py b/samples/client/echo_api/python/openapi_client/models/data_query.py index 7d491a7aabf..bbccbf9fa10 100644 --- a/samples/client/echo_api/python/openapi_client/models/data_query.py +++ b/samples/client/echo_api/python/openapi_client/models/data_query.py @@ -30,7 +30,7 @@ class DataQuery(Query): suffix: Optional[StrictStr] = Field(None, description="test suffix") text: Optional[StrictStr] = Field(None, description="Some text containing white spaces") var_date: Optional[datetime] = Field(None, alias="date", description="A date") - __properties = ["suffix", "text", "date", "id", "outcomes"] + __properties = ["id", "outcomes", "suffix", "text", "date"] class Config: """Pydantic configuration""" @@ -68,11 +68,11 @@ class DataQuery(Query): return DataQuery.parse_obj(obj) _obj = DataQuery.parse_obj({ + "id": obj.get("id"), + "outcomes": obj.get("outcomes"), "suffix": obj.get("suffix"), "text": obj.get("text"), - "var_date": obj.get("date"), - "id": obj.get("id"), - "outcomes": obj.get("outcomes") + "var_date": obj.get("date") }) return _obj diff --git a/samples/client/echo_api/python/openapi_client/models/data_query_all_of.py b/samples/client/echo_api/python/openapi_client/models/data_query_all_of.py deleted file mode 100644 index 9e0080d2196..00000000000 --- a/samples/client/echo_api/python/openapi_client/models/data_query_all_of.py +++ /dev/null @@ -1,75 +0,0 @@ -# coding: utf-8 - -""" - Echo Server API - - Echo Server API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: team@openapitools.org - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from datetime import datetime -from typing import Optional -from pydantic import BaseModel, Field, StrictStr - -class DataQueryAllOf(BaseModel): - """ - DataQueryAllOf - """ - suffix: Optional[StrictStr] = Field(None, description="test suffix") - text: Optional[StrictStr] = Field(None, description="Some text containing white spaces") - var_date: Optional[datetime] = Field(None, alias="date", description="A date") - __properties = ["suffix", "text", "date"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> DataQueryAllOf: - """Create an instance of DataQueryAllOf from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> DataQueryAllOf: - """Create an instance of DataQueryAllOf from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return DataQueryAllOf.parse_obj(obj) - - _obj = DataQueryAllOf.parse_obj({ - "suffix": obj.get("suffix"), - "text": obj.get("text"), - "var_date": obj.get("date") - }) - return _obj - diff --git a/samples/client/echo_api/python/test/test_data_query_all_of.py b/samples/client/echo_api/python/test/test_data_query_all_of.py deleted file mode 100644 index d66ab9d52ff..00000000000 --- a/samples/client/echo_api/python/test/test_data_query_all_of.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding: utf-8 - -""" - Echo Server API - - Echo Server API # noqa: E501 - - The version of the OpenAPI document: 0.1.0 - Contact: team@openapitools.org - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest -import datetime - -import openapi_client -from openapi_client.models.data_query_all_of import DataQueryAllOf # noqa: E501 -from openapi_client.rest import ApiException - -class TestDataQueryAllOf(unittest.TestCase): - """DataQueryAllOf unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test DataQueryAllOf - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `DataQueryAllOf` - """ - model = openapi_client.models.data_query_all_of.DataQueryAllOf() # noqa: E501 - if include_optional : - return DataQueryAllOf( - suffix = '', - text = 'Some text', - var_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') - ) - else : - return DataQueryAllOf( - ) - """ - - def testDataQueryAllOf(self): - """Test DataQueryAllOf""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/samples/client/others/typescript-axios/with-separate-models-and-api-inheritance/.openapi-generator/FILES b/samples/client/others/typescript-axios/with-separate-models-and-api-inheritance/.openapi-generator/FILES index d848128b34b..8bdf91c971a 100644 --- a/samples/client/others/typescript-axios/with-separate-models-and-api-inheritance/.openapi-generator/FILES +++ b/samples/client/others/typescript-axios/with-separate-models-and-api-inheritance/.openapi-generator/FILES @@ -9,7 +9,6 @@ index.ts model/abstract-flat-stock-pick-order-base-dto.ts model/abstract-user-dto.ts model/branch-dto.ts -model/flat-stock-pick-order-dto-all-of.ts model/flat-stock-pick-order-dto.ts model/index.ts model/internal-authenticated-user-dto.ts diff --git a/samples/client/others/typescript-axios/with-separate-models-and-api-inheritance/model/flat-stock-pick-order-dto-all-of.ts b/samples/client/others/typescript-axios/with-separate-models-and-api-inheritance/model/flat-stock-pick-order-dto-all-of.ts deleted file mode 100644 index 217dff00486..00000000000 --- a/samples/client/others/typescript-axios/with-separate-models-and-api-inheritance/model/flat-stock-pick-order-dto-all-of.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Example - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -/** - * - * @export - * @interface FlatStockPickOrderDtoAllOf - */ -export interface FlatStockPickOrderDtoAllOf { - /** - * - * @type {string} - * @memberof FlatStockPickOrderDtoAllOf - */ - 'blockedUntil'?: string; - /** - * - * @type {number} - * @memberof FlatStockPickOrderDtoAllOf - */ - 'blockedById'?: number; -} - diff --git a/samples/client/others/typescript-axios/with-separate-models-and-api-inheritance/model/flat-stock-pick-order-dto.ts b/samples/client/others/typescript-axios/with-separate-models-and-api-inheritance/model/flat-stock-pick-order-dto.ts index f473a8d58b2..f0c0e4a678c 100644 --- a/samples/client/others/typescript-axios/with-separate-models-and-api-inheritance/model/flat-stock-pick-order-dto.ts +++ b/samples/client/others/typescript-axios/with-separate-models-and-api-inheritance/model/flat-stock-pick-order-dto.ts @@ -16,14 +16,11 @@ // May contain unused imports in some cases // @ts-ignore import { AbstractFlatStockPickOrderBaseDto } from './abstract-flat-stock-pick-order-base-dto'; -// May contain unused imports in some cases -// @ts-ignore -import { FlatStockPickOrderDtoAllOf } from './flat-stock-pick-order-dto-all-of'; /** * @type FlatStockPickOrderDto * @export */ -export type FlatStockPickOrderDto = AbstractFlatStockPickOrderBaseDto & FlatStockPickOrderDtoAllOf; +export type FlatStockPickOrderDto = AbstractFlatStockPickOrderBaseDto; diff --git a/samples/client/others/typescript-axios/with-separate-models-and-api-inheritance/model/index.ts b/samples/client/others/typescript-axios/with-separate-models-and-api-inheritance/model/index.ts index 3642df8da68..9ac6b0826cf 100644 --- a/samples/client/others/typescript-axios/with-separate-models-and-api-inheritance/model/index.ts +++ b/samples/client/others/typescript-axios/with-separate-models-and-api-inheritance/model/index.ts @@ -2,6 +2,5 @@ export * from './abstract-flat-stock-pick-order-base-dto'; export * from './abstract-user-dto'; export * from './branch-dto'; export * from './flat-stock-pick-order-dto'; -export * from './flat-stock-pick-order-dto-all-of'; export * from './internal-authenticated-user-dto'; export * from './remote-authenticated-user-dto'; diff --git a/samples/client/others/typescript-rxjs/allOf-composition/.openapi-generator/FILES b/samples/client/others/typescript-rxjs/allOf-composition/.openapi-generator/FILES index 89276d499a4..c0a0f56281a 100644 --- a/samples/client/others/typescript-rxjs/allOf-composition/.openapi-generator/FILES +++ b/samples/client/others/typescript-rxjs/allOf-composition/.openapi-generator/FILES @@ -5,9 +5,7 @@ index.ts models/Hero.ts models/Human.ts models/SuperBaby.ts -models/SuperBabyAllOf.ts models/SuperBoy.ts -models/SuperBoyAllOf.ts models/SuperMan.ts models/index.ts runtime.ts diff --git a/samples/client/others/typescript-rxjs/allOf-composition/models/SuperBaby.ts b/samples/client/others/typescript-rxjs/allOf-composition/models/SuperBaby.ts index 1647f9aa201..34e768bf77e 100644 --- a/samples/client/others/typescript-rxjs/allOf-composition/models/SuperBaby.ts +++ b/samples/client/others/typescript-rxjs/allOf-composition/models/SuperBaby.ts @@ -13,11 +13,10 @@ import type { Human, - SuperBabyAllOf, } from './'; /** * @type SuperBaby * @export */ -export type SuperBaby = Human & SuperBabyAllOf; +export type SuperBaby = Human; diff --git a/samples/client/others/typescript-rxjs/allOf-composition/models/SuperBabyAllOf.ts b/samples/client/others/typescript-rxjs/allOf-composition/models/SuperBabyAllOf.ts deleted file mode 100644 index 459c28d0f4e..00000000000 --- a/samples/client/others/typescript-rxjs/allOf-composition/models/SuperBabyAllOf.ts +++ /dev/null @@ -1,29 +0,0 @@ -// tslint:disable -/** - * Example - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 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. - */ - -/** - * @export - * @interface SuperBabyAllOf - */ -export interface SuperBabyAllOf { - /** - * @type {string} - * @memberof SuperBabyAllOf - */ - gender?: string; - /** - * @type {number} - * @memberof SuperBabyAllOf - */ - age?: number; -} diff --git a/samples/client/others/typescript-rxjs/allOf-composition/models/SuperBoy.ts b/samples/client/others/typescript-rxjs/allOf-composition/models/SuperBoy.ts index 668faac8d17..8d648c02f4c 100644 --- a/samples/client/others/typescript-rxjs/allOf-composition/models/SuperBoy.ts +++ b/samples/client/others/typescript-rxjs/allOf-composition/models/SuperBoy.ts @@ -13,11 +13,10 @@ import type { Human, - SuperBoyAllOf, } from './'; /** * @type SuperBoy * @export */ -export type SuperBoy = Human & SuperBoyAllOf; +export type SuperBoy = Human; diff --git a/samples/client/others/typescript-rxjs/allOf-composition/models/SuperBoyAllOf.ts b/samples/client/others/typescript-rxjs/allOf-composition/models/SuperBoyAllOf.ts deleted file mode 100644 index 26003b90c7d..00000000000 --- a/samples/client/others/typescript-rxjs/allOf-composition/models/SuperBoyAllOf.ts +++ /dev/null @@ -1,29 +0,0 @@ -// tslint:disable -/** - * Example - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 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. - */ - -/** - * @export - * @interface SuperBoyAllOf - */ -export interface SuperBoyAllOf { - /** - * @type {string} - * @memberof SuperBoyAllOf - */ - category?: string; - /** - * @type {number} - * @memberof SuperBoyAllOf - */ - level: number; -} diff --git a/samples/client/others/typescript-rxjs/allOf-composition/models/SuperMan.ts b/samples/client/others/typescript-rxjs/allOf-composition/models/SuperMan.ts index 8548fb03519..f66efcce6af 100644 --- a/samples/client/others/typescript-rxjs/allOf-composition/models/SuperMan.ts +++ b/samples/client/others/typescript-rxjs/allOf-composition/models/SuperMan.ts @@ -14,11 +14,10 @@ import type { Hero, Human, - SuperBoyAllOf, } from './'; /** * @type SuperMan * @export */ -export type SuperMan = Hero & Human & SuperBoyAllOf; +export type SuperMan = Hero & Human; diff --git a/samples/client/others/typescript-rxjs/allOf-composition/models/index.ts b/samples/client/others/typescript-rxjs/allOf-composition/models/index.ts index d57bd6be7b9..c1b498598db 100644 --- a/samples/client/others/typescript-rxjs/allOf-composition/models/index.ts +++ b/samples/client/others/typescript-rxjs/allOf-composition/models/index.ts @@ -1,7 +1,5 @@ export * from './Hero'; export * from './Human'; export * from './SuperBaby'; -export * from './SuperBabyAllOf'; export * from './SuperBoy'; -export * from './SuperBoyAllOf'; export * from './SuperMan'; diff --git a/samples/client/petstore/R-httr2-wrapper/.openapi-generator/FILES b/samples/client/petstore/R-httr2-wrapper/.openapi-generator/FILES index d272f748838..3d39761f135 100644 --- a/samples/client/petstore/R-httr2-wrapper/.openapi-generator/FILES +++ b/samples/client/petstore/R-httr2-wrapper/.openapi-generator/FILES @@ -14,12 +14,10 @@ R/api_exception.R R/api_response.R R/basque_pig.R R/cat.R -R/cat_all_of.R R/category.R R/danish_pig.R R/date.R R/dog.R -R/dog_all_of.R R/fake_api.R R/format_test.R R/mammal.R @@ -46,12 +44,10 @@ docs/AnyOfPig.md docs/AnyOfPrimitiveTypeTest.md docs/BasquePig.md docs/Cat.md -docs/CatAllOf.md docs/Category.md docs/DanishPig.md docs/Date.md docs/Dog.md -docs/DogAllOf.md docs/FakeApi.md docs/FormatTest.md docs/Mammal.md diff --git a/samples/client/petstore/R-httr2-wrapper/NAMESPACE b/samples/client/petstore/R-httr2-wrapper/NAMESPACE index 9abd239e110..c4a03c84270 100644 --- a/samples/client/petstore/R-httr2-wrapper/NAMESPACE +++ b/samples/client/petstore/R-httr2-wrapper/NAMESPACE @@ -22,12 +22,10 @@ export(AnyOfPig) export(AnyOfPrimitiveTypeTest) export(BasquePig) export(Cat) -export(CatAllOf) export(Category) export(DanishPig) export(Date) export(Dog) -export(DogAllOf) export(FormatTest) export(Mammal) export(ModelApiResponse) diff --git a/samples/client/petstore/R-httr2-wrapper/R/cat_all_of.R b/samples/client/petstore/R-httr2-wrapper/R/cat_all_of.R deleted file mode 100644 index d25992a7878..00000000000 --- a/samples/client/petstore/R-httr2-wrapper/R/cat_all_of.R +++ /dev/null @@ -1,196 +0,0 @@ -#' Create a new CatAllOf -#' -#' @description -#' CatAllOf Class -#' -#' @docType class -#' @title CatAllOf -#' @description CatAllOf Class -#' @format An \code{R6Class} generator object -#' @field declawed character [optional] -#' @field _field_list a list of fields list(character) -#' @field additional_properties additional properties list(character) [optional] -#' @importFrom R6 R6Class -#' @importFrom jsonlite fromJSON toJSON -#' @export -CatAllOf <- R6::R6Class( - "CatAllOf", - public = list( - `declawed` = NULL, - `_field_list` = c("declawed"), - `additional_properties` = list(), - #' Initialize a new CatAllOf class. - #' - #' @description - #' Initialize a new CatAllOf class. - #' - #' @param declawed declawed - #' @param additional_properties additional properties (optional) - #' @param ... Other optional arguments. - #' @export - initialize = function(`declawed` = NULL, additional_properties = NULL, ...) { - if (!is.null(`declawed`)) { - if (!(is.logical(`declawed`) && length(`declawed`) == 1)) { - stop(paste("Error! Invalid data for `declawed`. Must be a boolean:", `declawed`)) - } - self$`declawed` <- `declawed` - } - if (!is.null(additional_properties)) { - for (key in names(additional_properties)) { - self$additional_properties[[key]] <- additional_properties[[key]] - } - } - }, - #' To JSON string - #' - #' @description - #' To JSON String - #' - #' @return CatAllOf in JSON format - #' @export - toJSON = function() { - CatAllOfObject <- list() - if (!is.null(self$`declawed`)) { - CatAllOfObject[["declawed"]] <- - self$`declawed` - } - for (key in names(self$additional_properties)) { - CatAllOfObject[[key]] <- self$additional_properties[[key]] - } - - CatAllOfObject - }, - #' Deserialize JSON string into an instance of CatAllOf - #' - #' @description - #' Deserialize JSON string into an instance of CatAllOf - #' - #' @param input_json the JSON input - #' @return the instance of CatAllOf - #' @export - fromJSON = function(input_json) { - this_object <- jsonlite::fromJSON(input_json) - if (!is.null(this_object$`declawed`)) { - self$`declawed` <- this_object$`declawed` - } - # process additional properties/fields in the payload - for (key in names(this_object)) { - if (!(key %in% self$`_field_list`)) { # json key not in list of fields - self$additional_properties[[key]] <- this_object[[key]] - } - } - - self - }, - #' To JSON string - #' - #' @description - #' To JSON String - #' - #' @return CatAllOf in JSON format - #' @export - toJSONString = function() { - jsoncontent <- c( - if (!is.null(self$`declawed`)) { - sprintf( - '"declawed": - %s - ', - tolower(self$`declawed`) - ) - } - ) - jsoncontent <- paste(jsoncontent, collapse = ",") - json_string <- as.character(jsonlite::minify(paste("{", jsoncontent, "}", sep = ""))) - json_obj <- jsonlite::fromJSON(json_string) - for (key in names(self$additional_properties)) { - json_obj[[key]] <- self$additional_properties[[key]] - } - json_string <- as.character(jsonlite::minify(jsonlite::toJSON(json_obj, auto_unbox = TRUE, digits = NA))) - }, - #' Deserialize JSON string into an instance of CatAllOf - #' - #' @description - #' Deserialize JSON string into an instance of CatAllOf - #' - #' @param input_json the JSON input - #' @return the instance of CatAllOf - #' @export - fromJSONString = function(input_json) { - this_object <- jsonlite::fromJSON(input_json) - self$`declawed` <- this_object$`declawed` - # process additional properties/fields in the payload - for (key in names(this_object)) { - if (!(key %in% self$`_field_list`)) { # json key not in list of fields - self$additional_properties[[key]] <- this_object[[key]] - } - } - - self - }, - #' Validate JSON input with respect to CatAllOf - #' - #' @description - #' Validate JSON input with respect to CatAllOf and throw an exception if invalid - #' - #' @param input the JSON input - #' @export - validateJSON = function(input) { - input_json <- jsonlite::fromJSON(input) - }, - #' To string (JSON format) - #' - #' @description - #' To string (JSON format) - #' - #' @return String representation of CatAllOf - #' @export - toString = function() { - self$toJSONString() - }, - #' Return true if the values in all fields are valid. - #' - #' @description - #' Return true if the values in all fields are valid. - #' - #' @return true if the values in all fields are valid. - #' @export - isValid = function() { - TRUE - }, - #' Return a list of invalid fields (if any). - #' - #' @description - #' Return a list of invalid fields (if any). - #' - #' @return A list of invalid fields (if any). - #' @export - getInvalidFields = function() { - invalid_fields <- list() - invalid_fields - }, - #' Print the object - #' - #' @description - #' Print the object - #' - #' @export - print = function() { - print(jsonlite::prettify(self$toJSONString())) - invisible(self) - } - ), - # Lock the class to prevent modifications to the method or field - lock_class = TRUE -) -## Uncomment below to unlock the class to allow modifications of the method or field -# CatAllOf$unlock() -# -## Below is an example to define the print function -# CatAllOf$set("public", "print", function(...) { -# print(jsonlite::prettify(self$toJSONString())) -# invisible(self) -# }) -## Uncomment below to lock the class to prevent modifications to the method or field -# CatAllOf$lock() - diff --git a/samples/client/petstore/R-httr2-wrapper/R/dog_all_of.R b/samples/client/petstore/R-httr2-wrapper/R/dog_all_of.R deleted file mode 100644 index d35a85abbb5..00000000000 --- a/samples/client/petstore/R-httr2-wrapper/R/dog_all_of.R +++ /dev/null @@ -1,196 +0,0 @@ -#' Create a new DogAllOf -#' -#' @description -#' DogAllOf Class -#' -#' @docType class -#' @title DogAllOf -#' @description DogAllOf Class -#' @format An \code{R6Class} generator object -#' @field breed character [optional] -#' @field _field_list a list of fields list(character) -#' @field additional_properties additional properties list(character) [optional] -#' @importFrom R6 R6Class -#' @importFrom jsonlite fromJSON toJSON -#' @export -DogAllOf <- R6::R6Class( - "DogAllOf", - public = list( - `breed` = NULL, - `_field_list` = c("breed"), - `additional_properties` = list(), - #' Initialize a new DogAllOf class. - #' - #' @description - #' Initialize a new DogAllOf class. - #' - #' @param breed breed - #' @param additional_properties additional properties (optional) - #' @param ... Other optional arguments. - #' @export - initialize = function(`breed` = NULL, additional_properties = NULL, ...) { - if (!is.null(`breed`)) { - if (!(is.character(`breed`) && length(`breed`) == 1)) { - stop(paste("Error! Invalid data for `breed`. Must be a string:", `breed`)) - } - self$`breed` <- `breed` - } - if (!is.null(additional_properties)) { - for (key in names(additional_properties)) { - self$additional_properties[[key]] <- additional_properties[[key]] - } - } - }, - #' To JSON string - #' - #' @description - #' To JSON String - #' - #' @return DogAllOf in JSON format - #' @export - toJSON = function() { - DogAllOfObject <- list() - if (!is.null(self$`breed`)) { - DogAllOfObject[["breed"]] <- - self$`breed` - } - for (key in names(self$additional_properties)) { - DogAllOfObject[[key]] <- self$additional_properties[[key]] - } - - DogAllOfObject - }, - #' Deserialize JSON string into an instance of DogAllOf - #' - #' @description - #' Deserialize JSON string into an instance of DogAllOf - #' - #' @param input_json the JSON input - #' @return the instance of DogAllOf - #' @export - fromJSON = function(input_json) { - this_object <- jsonlite::fromJSON(input_json) - if (!is.null(this_object$`breed`)) { - self$`breed` <- this_object$`breed` - } - # process additional properties/fields in the payload - for (key in names(this_object)) { - if (!(key %in% self$`_field_list`)) { # json key not in list of fields - self$additional_properties[[key]] <- this_object[[key]] - } - } - - self - }, - #' To JSON string - #' - #' @description - #' To JSON String - #' - #' @return DogAllOf in JSON format - #' @export - toJSONString = function() { - jsoncontent <- c( - if (!is.null(self$`breed`)) { - sprintf( - '"breed": - "%s" - ', - self$`breed` - ) - } - ) - jsoncontent <- paste(jsoncontent, collapse = ",") - json_string <- as.character(jsonlite::minify(paste("{", jsoncontent, "}", sep = ""))) - json_obj <- jsonlite::fromJSON(json_string) - for (key in names(self$additional_properties)) { - json_obj[[key]] <- self$additional_properties[[key]] - } - json_string <- as.character(jsonlite::minify(jsonlite::toJSON(json_obj, auto_unbox = TRUE, digits = NA))) - }, - #' Deserialize JSON string into an instance of DogAllOf - #' - #' @description - #' Deserialize JSON string into an instance of DogAllOf - #' - #' @param input_json the JSON input - #' @return the instance of DogAllOf - #' @export - fromJSONString = function(input_json) { - this_object <- jsonlite::fromJSON(input_json) - self$`breed` <- this_object$`breed` - # process additional properties/fields in the payload - for (key in names(this_object)) { - if (!(key %in% self$`_field_list`)) { # json key not in list of fields - self$additional_properties[[key]] <- this_object[[key]] - } - } - - self - }, - #' Validate JSON input with respect to DogAllOf - #' - #' @description - #' Validate JSON input with respect to DogAllOf and throw an exception if invalid - #' - #' @param input the JSON input - #' @export - validateJSON = function(input) { - input_json <- jsonlite::fromJSON(input) - }, - #' To string (JSON format) - #' - #' @description - #' To string (JSON format) - #' - #' @return String representation of DogAllOf - #' @export - toString = function() { - self$toJSONString() - }, - #' Return true if the values in all fields are valid. - #' - #' @description - #' Return true if the values in all fields are valid. - #' - #' @return true if the values in all fields are valid. - #' @export - isValid = function() { - TRUE - }, - #' Return a list of invalid fields (if any). - #' - #' @description - #' Return a list of invalid fields (if any). - #' - #' @return A list of invalid fields (if any). - #' @export - getInvalidFields = function() { - invalid_fields <- list() - invalid_fields - }, - #' Print the object - #' - #' @description - #' Print the object - #' - #' @export - print = function() { - print(jsonlite::prettify(self$toJSONString())) - invisible(self) - } - ), - # Lock the class to prevent modifications to the method or field - lock_class = TRUE -) -## Uncomment below to unlock the class to allow modifications of the method or field -# DogAllOf$unlock() -# -## Below is an example to define the print function -# DogAllOf$set("public", "print", function(...) { -# print(jsonlite::prettify(self$toJSONString())) -# invisible(self) -# }) -## Uncomment below to lock the class to prevent modifications to the method or field -# DogAllOf$lock() - diff --git a/samples/client/petstore/R-httr2-wrapper/README.md b/samples/client/petstore/R-httr2-wrapper/README.md index 792f1c20248..e09946a3a05 100644 --- a/samples/client/petstore/R-httr2-wrapper/README.md +++ b/samples/client/petstore/R-httr2-wrapper/README.md @@ -109,12 +109,10 @@ Class | Method | HTTP request | Description - [AnyOfPrimitiveTypeTest](docs/AnyOfPrimitiveTypeTest.md) - [BasquePig](docs/BasquePig.md) - [Cat](docs/Cat.md) - - [CatAllOf](docs/CatAllOf.md) - [Category](docs/Category.md) - [DanishPig](docs/DanishPig.md) - [Date](docs/Date.md) - [Dog](docs/Dog.md) - - [DogAllOf](docs/DogAllOf.md) - [FormatTest](docs/FormatTest.md) - [Mammal](docs/Mammal.md) - [ModelApiResponse](docs/ModelApiResponse.md) diff --git a/samples/client/petstore/R-httr2-wrapper/docs/CatAllOf.md b/samples/client/petstore/R-httr2-wrapper/docs/CatAllOf.md deleted file mode 100644 index ab2f71b88e2..00000000000 --- a/samples/client/petstore/R-httr2-wrapper/docs/CatAllOf.md +++ /dev/null @@ -1,9 +0,0 @@ -# petstore::CatAllOf - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**declawed** | **character** | | [optional] - - diff --git a/samples/client/petstore/R-httr2-wrapper/docs/DogAllOf.md b/samples/client/petstore/R-httr2-wrapper/docs/DogAllOf.md deleted file mode 100644 index 76783e8800c..00000000000 --- a/samples/client/petstore/R-httr2-wrapper/docs/DogAllOf.md +++ /dev/null @@ -1,9 +0,0 @@ -# petstore::DogAllOf - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**breed** | **character** | | [optional] - - diff --git a/samples/client/petstore/R-httr2-wrapper/tests/testthat/test_cat_all_of.R b/samples/client/petstore/R-httr2-wrapper/tests/testthat/test_cat_all_of.R deleted file mode 100644 index 83ee2fb835c..00000000000 --- a/samples/client/petstore/R-httr2-wrapper/tests/testthat/test_cat_all_of.R +++ /dev/null @@ -1,13 +0,0 @@ -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate - -context("Test CatAllOf") - -model_instance <- CatAllOf$new() - -test_that("declawed", { - # tests for the property `declawed` (character) - - # uncomment below to test the property - #expect_equal(model.instance$`declawed`, "EXPECTED_RESULT") -}) diff --git a/samples/client/petstore/R-httr2-wrapper/tests/testthat/test_dog_all_of.R b/samples/client/petstore/R-httr2-wrapper/tests/testthat/test_dog_all_of.R deleted file mode 100644 index 6d11847f66d..00000000000 --- a/samples/client/petstore/R-httr2-wrapper/tests/testthat/test_dog_all_of.R +++ /dev/null @@ -1,13 +0,0 @@ -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate - -context("Test DogAllOf") - -model_instance <- DogAllOf$new() - -test_that("breed", { - # tests for the property `breed` (character) - - # uncomment below to test the property - #expect_equal(model.instance$`breed`, "EXPECTED_RESULT") -}) diff --git a/samples/client/petstore/R-httr2/.openapi-generator/FILES b/samples/client/petstore/R-httr2/.openapi-generator/FILES index 766a7cea2d5..781b048629b 100644 --- a/samples/client/petstore/R-httr2/.openapi-generator/FILES +++ b/samples/client/petstore/R-httr2/.openapi-generator/FILES @@ -14,12 +14,10 @@ R/api_exception.R R/api_response.R R/basque_pig.R R/cat.R -R/cat_all_of.R R/category.R R/danish_pig.R R/date.R R/dog.R -R/dog_all_of.R R/fake_api.R R/format_test.R R/mammal.R @@ -45,12 +43,10 @@ docs/AnyOfPig.md docs/AnyOfPrimitiveTypeTest.md docs/BasquePig.md docs/Cat.md -docs/CatAllOf.md docs/Category.md docs/DanishPig.md docs/Date.md docs/Dog.md -docs/DogAllOf.md docs/FakeApi.md docs/FormatTest.md docs/Mammal.md diff --git a/samples/client/petstore/R-httr2/NAMESPACE b/samples/client/petstore/R-httr2/NAMESPACE index 4337308c71a..26ea22705ad 100644 --- a/samples/client/petstore/R-httr2/NAMESPACE +++ b/samples/client/petstore/R-httr2/NAMESPACE @@ -20,12 +20,10 @@ export(AnyOfPig) export(AnyOfPrimitiveTypeTest) export(BasquePig) export(Cat) -export(CatAllOf) export(Category) export(DanishPig) export(Date) export(Dog) -export(DogAllOf) export(FormatTest) export(Mammal) export(ModelApiResponse) diff --git a/samples/client/petstore/R-httr2/R/cat_all_of.R b/samples/client/petstore/R-httr2/R/cat_all_of.R deleted file mode 100644 index 6ce939b452d..00000000000 --- a/samples/client/petstore/R-httr2/R/cat_all_of.R +++ /dev/null @@ -1,163 +0,0 @@ -#' Create a new CatAllOf -#' -#' @description -#' CatAllOf Class -#' -#' @docType class -#' @title CatAllOf -#' @description CatAllOf Class -#' @format An \code{R6Class} generator object -#' @field declawed character [optional] -#' @importFrom R6 R6Class -#' @importFrom jsonlite fromJSON toJSON -#' @export -CatAllOf <- R6::R6Class( - "CatAllOf", - public = list( - `declawed` = NULL, - #' Initialize a new CatAllOf class. - #' - #' @description - #' Initialize a new CatAllOf class. - #' - #' @param declawed declawed - #' @param ... Other optional arguments. - #' @export - initialize = function(`declawed` = NULL, ...) { - if (!is.null(`declawed`)) { - if (!(is.logical(`declawed`) && length(`declawed`) == 1)) { - stop(paste("Error! Invalid data for `declawed`. Must be a boolean:", `declawed`)) - } - self$`declawed` <- `declawed` - } - }, - #' To JSON string - #' - #' @description - #' To JSON String - #' - #' @return CatAllOf in JSON format - #' @export - toJSON = function() { - CatAllOfObject <- list() - if (!is.null(self$`declawed`)) { - CatAllOfObject[["declawed"]] <- - self$`declawed` - } - CatAllOfObject - }, - #' Deserialize JSON string into an instance of CatAllOf - #' - #' @description - #' Deserialize JSON string into an instance of CatAllOf - #' - #' @param input_json the JSON input - #' @return the instance of CatAllOf - #' @export - fromJSON = function(input_json) { - this_object <- jsonlite::fromJSON(input_json) - if (!is.null(this_object$`declawed`)) { - self$`declawed` <- this_object$`declawed` - } - self - }, - #' To JSON string - #' - #' @description - #' To JSON String - #' - #' @return CatAllOf in JSON format - #' @export - toJSONString = function() { - jsoncontent <- c( - if (!is.null(self$`declawed`)) { - sprintf( - '"declawed": - %s - ', - tolower(self$`declawed`) - ) - } - ) - jsoncontent <- paste(jsoncontent, collapse = ",") - json_string <- as.character(jsonlite::minify(paste("{", jsoncontent, "}", sep = ""))) - }, - #' Deserialize JSON string into an instance of CatAllOf - #' - #' @description - #' Deserialize JSON string into an instance of CatAllOf - #' - #' @param input_json the JSON input - #' @return the instance of CatAllOf - #' @export - fromJSONString = function(input_json) { - this_object <- jsonlite::fromJSON(input_json) - self$`declawed` <- this_object$`declawed` - self - }, - #' Validate JSON input with respect to CatAllOf - #' - #' @description - #' Validate JSON input with respect to CatAllOf and throw an exception if invalid - #' - #' @param input the JSON input - #' @export - validateJSON = function(input) { - input_json <- jsonlite::fromJSON(input) - }, - #' To string (JSON format) - #' - #' @description - #' To string (JSON format) - #' - #' @return String representation of CatAllOf - #' @export - toString = function() { - self$toJSONString() - }, - #' Return true if the values in all fields are valid. - #' - #' @description - #' Return true if the values in all fields are valid. - #' - #' @return true if the values in all fields are valid. - #' @export - isValid = function() { - TRUE - }, - #' Return a list of invalid fields (if any). - #' - #' @description - #' Return a list of invalid fields (if any). - #' - #' @return A list of invalid fields (if any). - #' @export - getInvalidFields = function() { - invalid_fields <- list() - invalid_fields - }, - #' Print the object - #' - #' @description - #' Print the object - #' - #' @export - print = function() { - print(jsonlite::prettify(self$toJSONString())) - invisible(self) - } - ), - # Lock the class to prevent modifications to the method or field - lock_class = TRUE -) -## Uncomment below to unlock the class to allow modifications of the method or field -# CatAllOf$unlock() -# -## Below is an example to define the print function -# CatAllOf$set("public", "print", function(...) { -# print(jsonlite::prettify(self$toJSONString())) -# invisible(self) -# }) -## Uncomment below to lock the class to prevent modifications to the method or field -# CatAllOf$lock() - diff --git a/samples/client/petstore/R-httr2/R/dog_all_of.R b/samples/client/petstore/R-httr2/R/dog_all_of.R deleted file mode 100644 index 42f587493a7..00000000000 --- a/samples/client/petstore/R-httr2/R/dog_all_of.R +++ /dev/null @@ -1,163 +0,0 @@ -#' Create a new DogAllOf -#' -#' @description -#' DogAllOf Class -#' -#' @docType class -#' @title DogAllOf -#' @description DogAllOf Class -#' @format An \code{R6Class} generator object -#' @field breed character [optional] -#' @importFrom R6 R6Class -#' @importFrom jsonlite fromJSON toJSON -#' @export -DogAllOf <- R6::R6Class( - "DogAllOf", - public = list( - `breed` = NULL, - #' Initialize a new DogAllOf class. - #' - #' @description - #' Initialize a new DogAllOf class. - #' - #' @param breed breed - #' @param ... Other optional arguments. - #' @export - initialize = function(`breed` = NULL, ...) { - if (!is.null(`breed`)) { - if (!(is.character(`breed`) && length(`breed`) == 1)) { - stop(paste("Error! Invalid data for `breed`. Must be a string:", `breed`)) - } - self$`breed` <- `breed` - } - }, - #' To JSON string - #' - #' @description - #' To JSON String - #' - #' @return DogAllOf in JSON format - #' @export - toJSON = function() { - DogAllOfObject <- list() - if (!is.null(self$`breed`)) { - DogAllOfObject[["breed"]] <- - self$`breed` - } - DogAllOfObject - }, - #' Deserialize JSON string into an instance of DogAllOf - #' - #' @description - #' Deserialize JSON string into an instance of DogAllOf - #' - #' @param input_json the JSON input - #' @return the instance of DogAllOf - #' @export - fromJSON = function(input_json) { - this_object <- jsonlite::fromJSON(input_json) - if (!is.null(this_object$`breed`)) { - self$`breed` <- this_object$`breed` - } - self - }, - #' To JSON string - #' - #' @description - #' To JSON String - #' - #' @return DogAllOf in JSON format - #' @export - toJSONString = function() { - jsoncontent <- c( - if (!is.null(self$`breed`)) { - sprintf( - '"breed": - "%s" - ', - self$`breed` - ) - } - ) - jsoncontent <- paste(jsoncontent, collapse = ",") - json_string <- as.character(jsonlite::minify(paste("{", jsoncontent, "}", sep = ""))) - }, - #' Deserialize JSON string into an instance of DogAllOf - #' - #' @description - #' Deserialize JSON string into an instance of DogAllOf - #' - #' @param input_json the JSON input - #' @return the instance of DogAllOf - #' @export - fromJSONString = function(input_json) { - this_object <- jsonlite::fromJSON(input_json) - self$`breed` <- this_object$`breed` - self - }, - #' Validate JSON input with respect to DogAllOf - #' - #' @description - #' Validate JSON input with respect to DogAllOf and throw an exception if invalid - #' - #' @param input the JSON input - #' @export - validateJSON = function(input) { - input_json <- jsonlite::fromJSON(input) - }, - #' To string (JSON format) - #' - #' @description - #' To string (JSON format) - #' - #' @return String representation of DogAllOf - #' @export - toString = function() { - self$toJSONString() - }, - #' Return true if the values in all fields are valid. - #' - #' @description - #' Return true if the values in all fields are valid. - #' - #' @return true if the values in all fields are valid. - #' @export - isValid = function() { - TRUE - }, - #' Return a list of invalid fields (if any). - #' - #' @description - #' Return a list of invalid fields (if any). - #' - #' @return A list of invalid fields (if any). - #' @export - getInvalidFields = function() { - invalid_fields <- list() - invalid_fields - }, - #' Print the object - #' - #' @description - #' Print the object - #' - #' @export - print = function() { - print(jsonlite::prettify(self$toJSONString())) - invisible(self) - } - ), - # Lock the class to prevent modifications to the method or field - lock_class = TRUE -) -## Uncomment below to unlock the class to allow modifications of the method or field -# DogAllOf$unlock() -# -## Below is an example to define the print function -# DogAllOf$set("public", "print", function(...) { -# print(jsonlite::prettify(self$toJSONString())) -# invisible(self) -# }) -## Uncomment below to lock the class to prevent modifications to the method or field -# DogAllOf$lock() - diff --git a/samples/client/petstore/R-httr2/README.md b/samples/client/petstore/R-httr2/README.md index 792f1c20248..e09946a3a05 100644 --- a/samples/client/petstore/R-httr2/README.md +++ b/samples/client/petstore/R-httr2/README.md @@ -109,12 +109,10 @@ Class | Method | HTTP request | Description - [AnyOfPrimitiveTypeTest](docs/AnyOfPrimitiveTypeTest.md) - [BasquePig](docs/BasquePig.md) - [Cat](docs/Cat.md) - - [CatAllOf](docs/CatAllOf.md) - [Category](docs/Category.md) - [DanishPig](docs/DanishPig.md) - [Date](docs/Date.md) - [Dog](docs/Dog.md) - - [DogAllOf](docs/DogAllOf.md) - [FormatTest](docs/FormatTest.md) - [Mammal](docs/Mammal.md) - [ModelApiResponse](docs/ModelApiResponse.md) diff --git a/samples/client/petstore/R-httr2/docs/CatAllOf.md b/samples/client/petstore/R-httr2/docs/CatAllOf.md deleted file mode 100644 index ab2f71b88e2..00000000000 --- a/samples/client/petstore/R-httr2/docs/CatAllOf.md +++ /dev/null @@ -1,9 +0,0 @@ -# petstore::CatAllOf - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**declawed** | **character** | | [optional] - - diff --git a/samples/client/petstore/R-httr2/docs/DogAllOf.md b/samples/client/petstore/R-httr2/docs/DogAllOf.md deleted file mode 100644 index 76783e8800c..00000000000 --- a/samples/client/petstore/R-httr2/docs/DogAllOf.md +++ /dev/null @@ -1,9 +0,0 @@ -# petstore::DogAllOf - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**breed** | **character** | | [optional] - - diff --git a/samples/client/petstore/R-httr2/tests/testthat/test_cat_all_of.R b/samples/client/petstore/R-httr2/tests/testthat/test_cat_all_of.R deleted file mode 100644 index 83ee2fb835c..00000000000 --- a/samples/client/petstore/R-httr2/tests/testthat/test_cat_all_of.R +++ /dev/null @@ -1,13 +0,0 @@ -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate - -context("Test CatAllOf") - -model_instance <- CatAllOf$new() - -test_that("declawed", { - # tests for the property `declawed` (character) - - # uncomment below to test the property - #expect_equal(model.instance$`declawed`, "EXPECTED_RESULT") -}) diff --git a/samples/client/petstore/R-httr2/tests/testthat/test_dog_all_of.R b/samples/client/petstore/R-httr2/tests/testthat/test_dog_all_of.R deleted file mode 100644 index 6d11847f66d..00000000000 --- a/samples/client/petstore/R-httr2/tests/testthat/test_dog_all_of.R +++ /dev/null @@ -1,13 +0,0 @@ -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate - -context("Test DogAllOf") - -model_instance <- DogAllOf$new() - -test_that("breed", { - # tests for the property `breed` (character) - - # uncomment below to test the property - #expect_equal(model.instance$`breed`, "EXPECTED_RESULT") -}) diff --git a/samples/client/petstore/R/.openapi-generator/FILES b/samples/client/petstore/R/.openapi-generator/FILES index 766a7cea2d5..781b048629b 100644 --- a/samples/client/petstore/R/.openapi-generator/FILES +++ b/samples/client/petstore/R/.openapi-generator/FILES @@ -14,12 +14,10 @@ R/api_exception.R R/api_response.R R/basque_pig.R R/cat.R -R/cat_all_of.R R/category.R R/danish_pig.R R/date.R R/dog.R -R/dog_all_of.R R/fake_api.R R/format_test.R R/mammal.R @@ -45,12 +43,10 @@ docs/AnyOfPig.md docs/AnyOfPrimitiveTypeTest.md docs/BasquePig.md docs/Cat.md -docs/CatAllOf.md docs/Category.md docs/DanishPig.md docs/Date.md docs/Dog.md -docs/DogAllOf.md docs/FakeApi.md docs/FormatTest.md docs/Mammal.md diff --git a/samples/client/petstore/R/NAMESPACE b/samples/client/petstore/R/NAMESPACE index b1057393be9..e392e3ea9bd 100644 --- a/samples/client/petstore/R/NAMESPACE +++ b/samples/client/petstore/R/NAMESPACE @@ -20,12 +20,10 @@ export(AnyOfPig) export(AnyOfPrimitiveTypeTest) export(BasquePig) export(Cat) -export(CatAllOf) export(Category) export(DanishPig) export(Date) export(Dog) -export(DogAllOf) export(FormatTest) export(Mammal) export(ModelApiResponse) diff --git a/samples/client/petstore/R/R/cat_all_of.R b/samples/client/petstore/R/R/cat_all_of.R deleted file mode 100644 index d25992a7878..00000000000 --- a/samples/client/petstore/R/R/cat_all_of.R +++ /dev/null @@ -1,196 +0,0 @@ -#' Create a new CatAllOf -#' -#' @description -#' CatAllOf Class -#' -#' @docType class -#' @title CatAllOf -#' @description CatAllOf Class -#' @format An \code{R6Class} generator object -#' @field declawed character [optional] -#' @field _field_list a list of fields list(character) -#' @field additional_properties additional properties list(character) [optional] -#' @importFrom R6 R6Class -#' @importFrom jsonlite fromJSON toJSON -#' @export -CatAllOf <- R6::R6Class( - "CatAllOf", - public = list( - `declawed` = NULL, - `_field_list` = c("declawed"), - `additional_properties` = list(), - #' Initialize a new CatAllOf class. - #' - #' @description - #' Initialize a new CatAllOf class. - #' - #' @param declawed declawed - #' @param additional_properties additional properties (optional) - #' @param ... Other optional arguments. - #' @export - initialize = function(`declawed` = NULL, additional_properties = NULL, ...) { - if (!is.null(`declawed`)) { - if (!(is.logical(`declawed`) && length(`declawed`) == 1)) { - stop(paste("Error! Invalid data for `declawed`. Must be a boolean:", `declawed`)) - } - self$`declawed` <- `declawed` - } - if (!is.null(additional_properties)) { - for (key in names(additional_properties)) { - self$additional_properties[[key]] <- additional_properties[[key]] - } - } - }, - #' To JSON string - #' - #' @description - #' To JSON String - #' - #' @return CatAllOf in JSON format - #' @export - toJSON = function() { - CatAllOfObject <- list() - if (!is.null(self$`declawed`)) { - CatAllOfObject[["declawed"]] <- - self$`declawed` - } - for (key in names(self$additional_properties)) { - CatAllOfObject[[key]] <- self$additional_properties[[key]] - } - - CatAllOfObject - }, - #' Deserialize JSON string into an instance of CatAllOf - #' - #' @description - #' Deserialize JSON string into an instance of CatAllOf - #' - #' @param input_json the JSON input - #' @return the instance of CatAllOf - #' @export - fromJSON = function(input_json) { - this_object <- jsonlite::fromJSON(input_json) - if (!is.null(this_object$`declawed`)) { - self$`declawed` <- this_object$`declawed` - } - # process additional properties/fields in the payload - for (key in names(this_object)) { - if (!(key %in% self$`_field_list`)) { # json key not in list of fields - self$additional_properties[[key]] <- this_object[[key]] - } - } - - self - }, - #' To JSON string - #' - #' @description - #' To JSON String - #' - #' @return CatAllOf in JSON format - #' @export - toJSONString = function() { - jsoncontent <- c( - if (!is.null(self$`declawed`)) { - sprintf( - '"declawed": - %s - ', - tolower(self$`declawed`) - ) - } - ) - jsoncontent <- paste(jsoncontent, collapse = ",") - json_string <- as.character(jsonlite::minify(paste("{", jsoncontent, "}", sep = ""))) - json_obj <- jsonlite::fromJSON(json_string) - for (key in names(self$additional_properties)) { - json_obj[[key]] <- self$additional_properties[[key]] - } - json_string <- as.character(jsonlite::minify(jsonlite::toJSON(json_obj, auto_unbox = TRUE, digits = NA))) - }, - #' Deserialize JSON string into an instance of CatAllOf - #' - #' @description - #' Deserialize JSON string into an instance of CatAllOf - #' - #' @param input_json the JSON input - #' @return the instance of CatAllOf - #' @export - fromJSONString = function(input_json) { - this_object <- jsonlite::fromJSON(input_json) - self$`declawed` <- this_object$`declawed` - # process additional properties/fields in the payload - for (key in names(this_object)) { - if (!(key %in% self$`_field_list`)) { # json key not in list of fields - self$additional_properties[[key]] <- this_object[[key]] - } - } - - self - }, - #' Validate JSON input with respect to CatAllOf - #' - #' @description - #' Validate JSON input with respect to CatAllOf and throw an exception if invalid - #' - #' @param input the JSON input - #' @export - validateJSON = function(input) { - input_json <- jsonlite::fromJSON(input) - }, - #' To string (JSON format) - #' - #' @description - #' To string (JSON format) - #' - #' @return String representation of CatAllOf - #' @export - toString = function() { - self$toJSONString() - }, - #' Return true if the values in all fields are valid. - #' - #' @description - #' Return true if the values in all fields are valid. - #' - #' @return true if the values in all fields are valid. - #' @export - isValid = function() { - TRUE - }, - #' Return a list of invalid fields (if any). - #' - #' @description - #' Return a list of invalid fields (if any). - #' - #' @return A list of invalid fields (if any). - #' @export - getInvalidFields = function() { - invalid_fields <- list() - invalid_fields - }, - #' Print the object - #' - #' @description - #' Print the object - #' - #' @export - print = function() { - print(jsonlite::prettify(self$toJSONString())) - invisible(self) - } - ), - # Lock the class to prevent modifications to the method or field - lock_class = TRUE -) -## Uncomment below to unlock the class to allow modifications of the method or field -# CatAllOf$unlock() -# -## Below is an example to define the print function -# CatAllOf$set("public", "print", function(...) { -# print(jsonlite::prettify(self$toJSONString())) -# invisible(self) -# }) -## Uncomment below to lock the class to prevent modifications to the method or field -# CatAllOf$lock() - diff --git a/samples/client/petstore/R/R/dog_all_of.R b/samples/client/petstore/R/R/dog_all_of.R deleted file mode 100644 index d35a85abbb5..00000000000 --- a/samples/client/petstore/R/R/dog_all_of.R +++ /dev/null @@ -1,196 +0,0 @@ -#' Create a new DogAllOf -#' -#' @description -#' DogAllOf Class -#' -#' @docType class -#' @title DogAllOf -#' @description DogAllOf Class -#' @format An \code{R6Class} generator object -#' @field breed character [optional] -#' @field _field_list a list of fields list(character) -#' @field additional_properties additional properties list(character) [optional] -#' @importFrom R6 R6Class -#' @importFrom jsonlite fromJSON toJSON -#' @export -DogAllOf <- R6::R6Class( - "DogAllOf", - public = list( - `breed` = NULL, - `_field_list` = c("breed"), - `additional_properties` = list(), - #' Initialize a new DogAllOf class. - #' - #' @description - #' Initialize a new DogAllOf class. - #' - #' @param breed breed - #' @param additional_properties additional properties (optional) - #' @param ... Other optional arguments. - #' @export - initialize = function(`breed` = NULL, additional_properties = NULL, ...) { - if (!is.null(`breed`)) { - if (!(is.character(`breed`) && length(`breed`) == 1)) { - stop(paste("Error! Invalid data for `breed`. Must be a string:", `breed`)) - } - self$`breed` <- `breed` - } - if (!is.null(additional_properties)) { - for (key in names(additional_properties)) { - self$additional_properties[[key]] <- additional_properties[[key]] - } - } - }, - #' To JSON string - #' - #' @description - #' To JSON String - #' - #' @return DogAllOf in JSON format - #' @export - toJSON = function() { - DogAllOfObject <- list() - if (!is.null(self$`breed`)) { - DogAllOfObject[["breed"]] <- - self$`breed` - } - for (key in names(self$additional_properties)) { - DogAllOfObject[[key]] <- self$additional_properties[[key]] - } - - DogAllOfObject - }, - #' Deserialize JSON string into an instance of DogAllOf - #' - #' @description - #' Deserialize JSON string into an instance of DogAllOf - #' - #' @param input_json the JSON input - #' @return the instance of DogAllOf - #' @export - fromJSON = function(input_json) { - this_object <- jsonlite::fromJSON(input_json) - if (!is.null(this_object$`breed`)) { - self$`breed` <- this_object$`breed` - } - # process additional properties/fields in the payload - for (key in names(this_object)) { - if (!(key %in% self$`_field_list`)) { # json key not in list of fields - self$additional_properties[[key]] <- this_object[[key]] - } - } - - self - }, - #' To JSON string - #' - #' @description - #' To JSON String - #' - #' @return DogAllOf in JSON format - #' @export - toJSONString = function() { - jsoncontent <- c( - if (!is.null(self$`breed`)) { - sprintf( - '"breed": - "%s" - ', - self$`breed` - ) - } - ) - jsoncontent <- paste(jsoncontent, collapse = ",") - json_string <- as.character(jsonlite::minify(paste("{", jsoncontent, "}", sep = ""))) - json_obj <- jsonlite::fromJSON(json_string) - for (key in names(self$additional_properties)) { - json_obj[[key]] <- self$additional_properties[[key]] - } - json_string <- as.character(jsonlite::minify(jsonlite::toJSON(json_obj, auto_unbox = TRUE, digits = NA))) - }, - #' Deserialize JSON string into an instance of DogAllOf - #' - #' @description - #' Deserialize JSON string into an instance of DogAllOf - #' - #' @param input_json the JSON input - #' @return the instance of DogAllOf - #' @export - fromJSONString = function(input_json) { - this_object <- jsonlite::fromJSON(input_json) - self$`breed` <- this_object$`breed` - # process additional properties/fields in the payload - for (key in names(this_object)) { - if (!(key %in% self$`_field_list`)) { # json key not in list of fields - self$additional_properties[[key]] <- this_object[[key]] - } - } - - self - }, - #' Validate JSON input with respect to DogAllOf - #' - #' @description - #' Validate JSON input with respect to DogAllOf and throw an exception if invalid - #' - #' @param input the JSON input - #' @export - validateJSON = function(input) { - input_json <- jsonlite::fromJSON(input) - }, - #' To string (JSON format) - #' - #' @description - #' To string (JSON format) - #' - #' @return String representation of DogAllOf - #' @export - toString = function() { - self$toJSONString() - }, - #' Return true if the values in all fields are valid. - #' - #' @description - #' Return true if the values in all fields are valid. - #' - #' @return true if the values in all fields are valid. - #' @export - isValid = function() { - TRUE - }, - #' Return a list of invalid fields (if any). - #' - #' @description - #' Return a list of invalid fields (if any). - #' - #' @return A list of invalid fields (if any). - #' @export - getInvalidFields = function() { - invalid_fields <- list() - invalid_fields - }, - #' Print the object - #' - #' @description - #' Print the object - #' - #' @export - print = function() { - print(jsonlite::prettify(self$toJSONString())) - invisible(self) - } - ), - # Lock the class to prevent modifications to the method or field - lock_class = TRUE -) -## Uncomment below to unlock the class to allow modifications of the method or field -# DogAllOf$unlock() -# -## Below is an example to define the print function -# DogAllOf$set("public", "print", function(...) { -# print(jsonlite::prettify(self$toJSONString())) -# invisible(self) -# }) -## Uncomment below to lock the class to prevent modifications to the method or field -# DogAllOf$lock() - diff --git a/samples/client/petstore/R/README.md b/samples/client/petstore/R/README.md index b33b4f0b072..5975b55d476 100644 --- a/samples/client/petstore/R/README.md +++ b/samples/client/petstore/R/README.md @@ -109,12 +109,10 @@ Class | Method | HTTP request | Description - [AnyOfPrimitiveTypeTest](docs/AnyOfPrimitiveTypeTest.md) - [BasquePig](docs/BasquePig.md) - [Cat](docs/Cat.md) - - [CatAllOf](docs/CatAllOf.md) - [Category](docs/Category.md) - [DanishPig](docs/DanishPig.md) - [Date](docs/Date.md) - [Dog](docs/Dog.md) - - [DogAllOf](docs/DogAllOf.md) - [FormatTest](docs/FormatTest.md) - [Mammal](docs/Mammal.md) - [ModelApiResponse](docs/ModelApiResponse.md) diff --git a/samples/client/petstore/R/docs/CatAllOf.md b/samples/client/petstore/R/docs/CatAllOf.md deleted file mode 100644 index ab2f71b88e2..00000000000 --- a/samples/client/petstore/R/docs/CatAllOf.md +++ /dev/null @@ -1,9 +0,0 @@ -# petstore::CatAllOf - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**declawed** | **character** | | [optional] - - diff --git a/samples/client/petstore/R/docs/DogAllOf.md b/samples/client/petstore/R/docs/DogAllOf.md deleted file mode 100644 index 76783e8800c..00000000000 --- a/samples/client/petstore/R/docs/DogAllOf.md +++ /dev/null @@ -1,9 +0,0 @@ -# petstore::DogAllOf - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**breed** | **character** | | [optional] - - diff --git a/samples/client/petstore/R/tests/testthat/test_cat_all_of.R b/samples/client/petstore/R/tests/testthat/test_cat_all_of.R deleted file mode 100644 index 83ee2fb835c..00000000000 --- a/samples/client/petstore/R/tests/testthat/test_cat_all_of.R +++ /dev/null @@ -1,13 +0,0 @@ -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate - -context("Test CatAllOf") - -model_instance <- CatAllOf$new() - -test_that("declawed", { - # tests for the property `declawed` (character) - - # uncomment below to test the property - #expect_equal(model.instance$`declawed`, "EXPECTED_RESULT") -}) diff --git a/samples/client/petstore/R/tests/testthat/test_dog_all_of.R b/samples/client/petstore/R/tests/testthat/test_dog_all_of.R deleted file mode 100644 index 6d11847f66d..00000000000 --- a/samples/client/petstore/R/tests/testthat/test_dog_all_of.R +++ /dev/null @@ -1,13 +0,0 @@ -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate - -context("Test DogAllOf") - -model_instance <- DogAllOf$new() - -test_that("breed", { - # tests for the property `breed` (character) - - # uncomment below to test the property - #expect_equal(model.instance$`breed`, "EXPECTED_RESULT") -}) diff --git a/samples/client/petstore/bash/.openapi-generator/FILES b/samples/client/petstore/bash/.openapi-generator/FILES index 918b7a49c26..9c4dd87937d 100644 --- a/samples/client/petstore/bash/.openapi-generator/FILES +++ b/samples/client/petstore/bash/.openapi-generator/FILES @@ -18,15 +18,12 @@ docs/ArrayOfArrayOfNumberOnly.md docs/ArrayOfNumberOnly.md docs/ArrayTest.md docs/BigCat.md -docs/BigCatAllOf.md docs/Capitalization.md docs/Cat.md -docs/CatAllOf.md docs/Category.md docs/ClassModel.md docs/Client.md docs/Dog.md -docs/DogAllOf.md docs/EnumArrays.md docs/EnumClass.md docs/EnumTest.md diff --git a/samples/client/petstore/bash/README.md b/samples/client/petstore/bash/README.md index fb9aa0dbd42..54bc5b4ed6c 100644 --- a/samples/client/petstore/bash/README.md +++ b/samples/client/petstore/bash/README.md @@ -163,15 +163,12 @@ Class | Method | HTTP request | Description - [ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md) - [ArrayTest](docs/ArrayTest.md) - [BigCat](docs/BigCat.md) - - [BigCatAllOf](docs/BigCatAllOf.md) - [Capitalization](docs/Capitalization.md) - [Cat](docs/Cat.md) - - [CatAllOf](docs/CatAllOf.md) - [Category](docs/Category.md) - [ClassModel](docs/ClassModel.md) - [Client](docs/Client.md) - [Dog](docs/Dog.md) - - [DogAllOf](docs/DogAllOf.md) - [EnumArrays](docs/EnumArrays.md) - [EnumClass](docs/EnumClass.md) - [EnumTest](docs/EnumTest.md) diff --git a/samples/client/petstore/bash/docs/BigCatAllOf.md b/samples/client/petstore/bash/docs/BigCatAllOf.md deleted file mode 100644 index 644efd8d679..00000000000 --- a/samples/client/petstore/bash/docs/BigCatAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# BigCat_allOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**kind** | **string** | | [optional] [default to null] - -[[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/bash/docs/CatAllOf.md b/samples/client/petstore/bash/docs/CatAllOf.md deleted file mode 100644 index 99ba1bec860..00000000000 --- a/samples/client/petstore/bash/docs/CatAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# Cat_allOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**declawed** | **boolean** | | [optional] [default to null] - -[[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/bash/docs/DogAllOf.md b/samples/client/petstore/bash/docs/DogAllOf.md deleted file mode 100644 index 2bf2fdd3478..00000000000 --- a/samples/client/petstore/bash/docs/DogAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# Dog_allOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**breed** | **string** | | [optional] [default to null] - -[[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/elixir/.openapi-generator/FILES b/samples/client/petstore/elixir/.openapi-generator/FILES index c4fc0e02aaf..cce73801e7c 100644 --- a/samples/client/petstore/elixir/.openapi-generator/FILES +++ b/samples/client/petstore/elixir/.openapi-generator/FILES @@ -23,13 +23,11 @@ lib/openapi_petstore/model/array_of_number_only.ex lib/openapi_petstore/model/array_test.ex lib/openapi_petstore/model/capitalization.ex lib/openapi_petstore/model/cat.ex -lib/openapi_petstore/model/cat_all_of.ex lib/openapi_petstore/model/category.ex lib/openapi_petstore/model/class_model.ex lib/openapi_petstore/model/client.ex lib/openapi_petstore/model/deprecated_object.ex lib/openapi_petstore/model/dog.ex -lib/openapi_petstore/model/dog_all_of.ex lib/openapi_petstore/model/enum_arrays.ex lib/openapi_petstore/model/enum_class.ex lib/openapi_petstore/model/enum_test.ex diff --git a/samples/client/petstore/elixir/lib/openapi_petstore/model/cat_all_of.ex b/samples/client/petstore/elixir/lib/openapi_petstore/model/cat_all_of.ex deleted file mode 100644 index c446876ca1b..00000000000 --- a/samples/client/petstore/elixir/lib/openapi_petstore/model/cat_all_of.ex +++ /dev/null @@ -1,24 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.0-SNAPSHOT (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule OpenapiPetstore.Model.CatAllOf do - @moduledoc """ - - """ - - @derive [Poison.Encoder] - defstruct [ - :declawed - ] - - @type t :: %__MODULE__{ - :declawed => boolean() | nil - } -end - -defimpl Poison.Decoder, for: OpenapiPetstore.Model.CatAllOf do - def decode(value, _options) do - value - end -end - diff --git a/samples/client/petstore/elixir/lib/openapi_petstore/model/dog_all_of.ex b/samples/client/petstore/elixir/lib/openapi_petstore/model/dog_all_of.ex deleted file mode 100644 index 6b66a188896..00000000000 --- a/samples/client/petstore/elixir/lib/openapi_petstore/model/dog_all_of.ex +++ /dev/null @@ -1,24 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.0-SNAPSHOT (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule OpenapiPetstore.Model.DogAllOf do - @moduledoc """ - - """ - - @derive [Poison.Encoder] - defstruct [ - :breed - ] - - @type t :: %__MODULE__{ - :breed => String.t | nil - } -end - -defimpl Poison.Decoder, for: OpenapiPetstore.Model.DogAllOf do - def decode(value, _options) do - value - end -end - diff --git a/samples/client/petstore/go/go-petstore/.openapi-generator/FILES b/samples/client/petstore/go/go-petstore/.openapi-generator/FILES index 8ba4ca23b2d..9df35e61115 100644 --- a/samples/client/petstore/go/go-petstore/.openapi-generator/FILES +++ b/samples/client/petstore/go/go-petstore/.openapi-generator/FILES @@ -25,15 +25,12 @@ docs/ArrayOfArrayOfNumberOnly.md docs/ArrayOfNumberOnly.md docs/ArrayTest.md docs/BigCat.md -docs/BigCatAllOf.md docs/Capitalization.md docs/Cat.md -docs/CatAllOf.md docs/Category.md docs/ClassModel.md docs/Client.md docs/Dog.md -docs/DogAllOf.md docs/EnumArrays.md docs/EnumClass.md docs/EnumTest.md @@ -82,15 +79,12 @@ model_array_of_array_of_number_only.go model_array_of_number_only.go model_array_test_.go model_big_cat.go -model_big_cat_all_of.go model_capitalization.go model_cat.go -model_cat_all_of.go model_category.go model_class_model.go model_client.go model_dog.go -model_dog_all_of.go model_enum_arrays.go model_enum_class.go model_enum_test_.go diff --git a/samples/client/petstore/go/go-petstore/README.md b/samples/client/petstore/go/go-petstore/README.md index 1274e8dbf80..dffdcd14c5b 100644 --- a/samples/client/petstore/go/go-petstore/README.md +++ b/samples/client/petstore/go/go-petstore/README.md @@ -133,15 +133,12 @@ Class | Method | HTTP request | Description - [ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md) - [ArrayTest](docs/ArrayTest.md) - [BigCat](docs/BigCat.md) - - [BigCatAllOf](docs/BigCatAllOf.md) - [Capitalization](docs/Capitalization.md) - [Cat](docs/Cat.md) - - [CatAllOf](docs/CatAllOf.md) - [Category](docs/Category.md) - [ClassModel](docs/ClassModel.md) - [Client](docs/Client.md) - [Dog](docs/Dog.md) - - [DogAllOf](docs/DogAllOf.md) - [EnumArrays](docs/EnumArrays.md) - [EnumClass](docs/EnumClass.md) - [EnumTest](docs/EnumTest.md) diff --git a/samples/client/petstore/go/go-petstore/api/openapi.yaml b/samples/client/petstore/go/go-petstore/api/openapi.yaml index ee7adb4d6c6..cc8ec0eb7b9 100644 --- a/samples/client/petstore/go/go-petstore/api/openapi.yaml +++ b/samples/client/petstore/go/go-petstore/api/openapi.yaml @@ -1303,15 +1303,29 @@ components: Dog: allOf: - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Dog_allOf' + - properties: + breed: + type: string + type: object Cat: allOf: - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Cat_allOf' + - properties: + declawed: + type: boolean + type: object BigCat: allOf: - $ref: '#/components/schemas/Cat' - - $ref: '#/components/schemas/BigCat_allOf' + - properties: + kind: + enum: + - lions + - tigers + - leopards + - jaguars + type: string + type: object Animal: discriminator: propertyName: className @@ -2104,29 +2118,6 @@ components: required: - requiredFile type: object - Dog_allOf: - properties: - breed: - type: string - type: object - example: null - Cat_allOf: - properties: - declawed: - type: boolean - type: object - example: null - BigCat_allOf: - properties: - kind: - enum: - - lions - - tigers - - leopards - - jaguars - type: string - type: object - example: null securitySchemes: petstore_auth: flows: diff --git a/samples/client/petstore/go/go-petstore/docs/BigCatAllOf.md b/samples/client/petstore/go/go-petstore/docs/BigCatAllOf.md deleted file mode 100644 index b237a6b2144..00000000000 --- a/samples/client/petstore/go/go-petstore/docs/BigCatAllOf.md +++ /dev/null @@ -1,56 +0,0 @@ -# BigCatAllOf - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Kind** | Pointer to **string** | | [optional] - -## Methods - -### NewBigCatAllOf - -`func NewBigCatAllOf() *BigCatAllOf` - -NewBigCatAllOf instantiates a new BigCatAllOf object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewBigCatAllOfWithDefaults - -`func NewBigCatAllOfWithDefaults() *BigCatAllOf` - -NewBigCatAllOfWithDefaults instantiates a new BigCatAllOf object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetKind - -`func (o *BigCatAllOf) GetKind() string` - -GetKind returns the Kind field if non-nil, zero value otherwise. - -### GetKindOk - -`func (o *BigCatAllOf) GetKindOk() (*string, bool)` - -GetKindOk returns a tuple with the Kind field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetKind - -`func (o *BigCatAllOf) SetKind(v string)` - -SetKind sets Kind field to given value. - -### HasKind - -`func (o *BigCatAllOf) HasKind() bool` - -HasKind returns a boolean if a field has been set. - - -[[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/go/go-petstore/docs/CatAllOf.md b/samples/client/petstore/go/go-petstore/docs/CatAllOf.md deleted file mode 100644 index be0cc6c8519..00000000000 --- a/samples/client/petstore/go/go-petstore/docs/CatAllOf.md +++ /dev/null @@ -1,56 +0,0 @@ -# CatAllOf - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Declawed** | Pointer to **bool** | | [optional] - -## Methods - -### NewCatAllOf - -`func NewCatAllOf() *CatAllOf` - -NewCatAllOf instantiates a new CatAllOf object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewCatAllOfWithDefaults - -`func NewCatAllOfWithDefaults() *CatAllOf` - -NewCatAllOfWithDefaults instantiates a new CatAllOf object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetDeclawed - -`func (o *CatAllOf) GetDeclawed() bool` - -GetDeclawed returns the Declawed field if non-nil, zero value otherwise. - -### GetDeclawedOk - -`func (o *CatAllOf) GetDeclawedOk() (*bool, bool)` - -GetDeclawedOk returns a tuple with the Declawed field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDeclawed - -`func (o *CatAllOf) SetDeclawed(v bool)` - -SetDeclawed sets Declawed field to given value. - -### HasDeclawed - -`func (o *CatAllOf) HasDeclawed() bool` - -HasDeclawed returns a boolean if a field has been set. - - -[[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/go/go-petstore/docs/DogAllOf.md b/samples/client/petstore/go/go-petstore/docs/DogAllOf.md deleted file mode 100644 index 3ed4dfa5ea2..00000000000 --- a/samples/client/petstore/go/go-petstore/docs/DogAllOf.md +++ /dev/null @@ -1,56 +0,0 @@ -# DogAllOf - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Breed** | Pointer to **string** | | [optional] - -## Methods - -### NewDogAllOf - -`func NewDogAllOf() *DogAllOf` - -NewDogAllOf instantiates a new DogAllOf object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewDogAllOfWithDefaults - -`func NewDogAllOfWithDefaults() *DogAllOf` - -NewDogAllOfWithDefaults instantiates a new DogAllOf object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetBreed - -`func (o *DogAllOf) GetBreed() string` - -GetBreed returns the Breed field if non-nil, zero value otherwise. - -### GetBreedOk - -`func (o *DogAllOf) GetBreedOk() (*string, bool)` - -GetBreedOk returns a tuple with the Breed field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetBreed - -`func (o *DogAllOf) SetBreed(v string)` - -SetBreed sets Breed field to given value. - -### HasBreed - -`func (o *DogAllOf) HasBreed() bool` - -HasBreed returns a boolean if a field has been set. - - -[[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/go/go-petstore/model_big_cat_all_of.go b/samples/client/petstore/go/go-petstore/model_big_cat_all_of.go deleted file mode 100644 index bd0486c3825..00000000000 --- a/samples/client/petstore/go/go-petstore/model_big_cat_all_of.go +++ /dev/null @@ -1,126 +0,0 @@ -/* -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: \" \\ - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package petstore - -import ( - "encoding/json" -) - -// checks if the BigCatAllOf type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &BigCatAllOf{} - -// BigCatAllOf struct for BigCatAllOf -type BigCatAllOf struct { - Kind *string `json:"kind,omitempty"` -} - -// NewBigCatAllOf instantiates a new BigCatAllOf object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewBigCatAllOf() *BigCatAllOf { - this := BigCatAllOf{} - return &this -} - -// NewBigCatAllOfWithDefaults instantiates a new BigCatAllOf object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewBigCatAllOfWithDefaults() *BigCatAllOf { - this := BigCatAllOf{} - return &this -} - -// GetKind returns the Kind field value if set, zero value otherwise. -func (o *BigCatAllOf) GetKind() string { - if o == nil || IsNil(o.Kind) { - var ret string - return ret - } - return *o.Kind -} - -// GetKindOk returns a tuple with the Kind field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *BigCatAllOf) GetKindOk() (*string, bool) { - if o == nil || IsNil(o.Kind) { - return nil, false - } - return o.Kind, true -} - -// HasKind returns a boolean if a field has been set. -func (o *BigCatAllOf) HasKind() bool { - if o != nil && !IsNil(o.Kind) { - return true - } - - return false -} - -// SetKind gets a reference to the given string and assigns it to the Kind field. -func (o *BigCatAllOf) SetKind(v string) { - o.Kind = &v -} - -func (o BigCatAllOf) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o BigCatAllOf) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Kind) { - toSerialize["kind"] = o.Kind - } - return toSerialize, nil -} - -type NullableBigCatAllOf struct { - value *BigCatAllOf - isSet bool -} - -func (v NullableBigCatAllOf) Get() *BigCatAllOf { - return v.value -} - -func (v *NullableBigCatAllOf) Set(val *BigCatAllOf) { - v.value = val - v.isSet = true -} - -func (v NullableBigCatAllOf) IsSet() bool { - return v.isSet -} - -func (v *NullableBigCatAllOf) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableBigCatAllOf(val *BigCatAllOf) *NullableBigCatAllOf { - return &NullableBigCatAllOf{value: val, isSet: true} -} - -func (v NullableBigCatAllOf) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableBigCatAllOf) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/samples/client/petstore/go/go-petstore/model_cat_all_of.go b/samples/client/petstore/go/go-petstore/model_cat_all_of.go deleted file mode 100644 index 29c956f3151..00000000000 --- a/samples/client/petstore/go/go-petstore/model_cat_all_of.go +++ /dev/null @@ -1,126 +0,0 @@ -/* -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: \" \\ - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package petstore - -import ( - "encoding/json" -) - -// checks if the CatAllOf type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CatAllOf{} - -// CatAllOf struct for CatAllOf -type CatAllOf struct { - Declawed *bool `json:"declawed,omitempty"` -} - -// NewCatAllOf instantiates a new CatAllOf object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewCatAllOf() *CatAllOf { - this := CatAllOf{} - return &this -} - -// NewCatAllOfWithDefaults instantiates a new CatAllOf object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewCatAllOfWithDefaults() *CatAllOf { - this := CatAllOf{} - return &this -} - -// GetDeclawed returns the Declawed field value if set, zero value otherwise. -func (o *CatAllOf) GetDeclawed() bool { - if o == nil || IsNil(o.Declawed) { - var ret bool - return ret - } - return *o.Declawed -} - -// GetDeclawedOk returns a tuple with the Declawed field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CatAllOf) GetDeclawedOk() (*bool, bool) { - if o == nil || IsNil(o.Declawed) { - return nil, false - } - return o.Declawed, true -} - -// HasDeclawed returns a boolean if a field has been set. -func (o *CatAllOf) HasDeclawed() bool { - if o != nil && !IsNil(o.Declawed) { - return true - } - - return false -} - -// SetDeclawed gets a reference to the given bool and assigns it to the Declawed field. -func (o *CatAllOf) SetDeclawed(v bool) { - o.Declawed = &v -} - -func (o CatAllOf) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o CatAllOf) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Declawed) { - toSerialize["declawed"] = o.Declawed - } - return toSerialize, nil -} - -type NullableCatAllOf struct { - value *CatAllOf - isSet bool -} - -func (v NullableCatAllOf) Get() *CatAllOf { - return v.value -} - -func (v *NullableCatAllOf) Set(val *CatAllOf) { - v.value = val - v.isSet = true -} - -func (v NullableCatAllOf) IsSet() bool { - return v.isSet -} - -func (v *NullableCatAllOf) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCatAllOf(val *CatAllOf) *NullableCatAllOf { - return &NullableCatAllOf{value: val, isSet: true} -} - -func (v NullableCatAllOf) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCatAllOf) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/samples/client/petstore/go/go-petstore/model_dog_all_of.go b/samples/client/petstore/go/go-petstore/model_dog_all_of.go deleted file mode 100644 index 63f065a52d0..00000000000 --- a/samples/client/petstore/go/go-petstore/model_dog_all_of.go +++ /dev/null @@ -1,126 +0,0 @@ -/* -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: \" \\ - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package petstore - -import ( - "encoding/json" -) - -// checks if the DogAllOf type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &DogAllOf{} - -// DogAllOf struct for DogAllOf -type DogAllOf struct { - Breed *string `json:"breed,omitempty"` -} - -// NewDogAllOf instantiates a new DogAllOf object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewDogAllOf() *DogAllOf { - this := DogAllOf{} - return &this -} - -// NewDogAllOfWithDefaults instantiates a new DogAllOf object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewDogAllOfWithDefaults() *DogAllOf { - this := DogAllOf{} - return &this -} - -// GetBreed returns the Breed field value if set, zero value otherwise. -func (o *DogAllOf) GetBreed() string { - if o == nil || IsNil(o.Breed) { - var ret string - return ret - } - return *o.Breed -} - -// GetBreedOk returns a tuple with the Breed field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *DogAllOf) GetBreedOk() (*string, bool) { - if o == nil || IsNil(o.Breed) { - return nil, false - } - return o.Breed, true -} - -// HasBreed returns a boolean if a field has been set. -func (o *DogAllOf) HasBreed() bool { - if o != nil && !IsNil(o.Breed) { - return true - } - - return false -} - -// SetBreed gets a reference to the given string and assigns it to the Breed field. -func (o *DogAllOf) SetBreed(v string) { - o.Breed = &v -} - -func (o DogAllOf) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o DogAllOf) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Breed) { - toSerialize["breed"] = o.Breed - } - return toSerialize, nil -} - -type NullableDogAllOf struct { - value *DogAllOf - isSet bool -} - -func (v NullableDogAllOf) Get() *DogAllOf { - return v.value -} - -func (v *NullableDogAllOf) Set(val *DogAllOf) { - v.value = val - v.isSet = true -} - -func (v NullableDogAllOf) IsSet() bool { - return v.isSet -} - -func (v *NullableDogAllOf) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableDogAllOf(val *DogAllOf) *NullableDogAllOf { - return &NullableDogAllOf{value: val, isSet: true} -} - -func (v NullableDogAllOf) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableDogAllOf) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/Model.hs b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/Model.hs index a51253d9b2f..4749e10f4f5 100644 --- a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/Model.hs +++ b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/Model.hs @@ -694,34 +694,6 @@ mkBigCat bigCatClassName = , bigCatKind = Nothing } --- ** BigCatAllOf --- | BigCatAllOf -data BigCatAllOf = BigCatAllOf - { bigCatAllOfKind :: !(Maybe E'Kind) -- ^ "kind" - } deriving (P.Show, P.Eq, P.Typeable) - --- | FromJSON BigCatAllOf -instance A.FromJSON BigCatAllOf where - parseJSON = A.withObject "BigCatAllOf" $ \o -> - BigCatAllOf - <$> (o .:? "kind") - --- | ToJSON BigCatAllOf -instance A.ToJSON BigCatAllOf where - toJSON BigCatAllOf {..} = - _omitNulls - [ "kind" .= bigCatAllOfKind - ] - - --- | Construct a value of type 'BigCatAllOf' (by applying it's required fields, if any) -mkBigCatAllOf - :: BigCatAllOf -mkBigCatAllOf = - BigCatAllOf - { bigCatAllOfKind = Nothing - } - -- ** Capitalization -- | Capitalization data Capitalization = Capitalization @@ -807,34 +779,6 @@ mkCat catClassName = , catDeclawed = Nothing } --- ** CatAllOf --- | CatAllOf -data CatAllOf = CatAllOf - { catAllOfDeclawed :: !(Maybe Bool) -- ^ "declawed" - } deriving (P.Show, P.Eq, P.Typeable) - --- | FromJSON CatAllOf -instance A.FromJSON CatAllOf where - parseJSON = A.withObject "CatAllOf" $ \o -> - CatAllOf - <$> (o .:? "declawed") - --- | ToJSON CatAllOf -instance A.ToJSON CatAllOf where - toJSON CatAllOf {..} = - _omitNulls - [ "declawed" .= catAllOfDeclawed - ] - - --- | Construct a value of type 'CatAllOf' (by applying it's required fields, if any) -mkCatAllOf - :: CatAllOf -mkCatAllOf = - CatAllOf - { catAllOfDeclawed = Nothing - } - -- ** Category -- | Category data Category = Category @@ -962,34 +906,6 @@ mkDog dogClassName = , dogBreed = Nothing } --- ** DogAllOf --- | DogAllOf -data DogAllOf = DogAllOf - { dogAllOfBreed :: !(Maybe Text) -- ^ "breed" - } deriving (P.Show, P.Eq, P.Typeable) - --- | FromJSON DogAllOf -instance A.FromJSON DogAllOf where - parseJSON = A.withObject "DogAllOf" $ \o -> - DogAllOf - <$> (o .:? "breed") - --- | ToJSON DogAllOf -instance A.ToJSON DogAllOf where - toJSON DogAllOf {..} = - _omitNulls - [ "breed" .= dogAllOfBreed - ] - - --- | Construct a value of type 'DogAllOf' (by applying it's required fields, if any) -mkDogAllOf - :: DogAllOf -mkDogAllOf = - DogAllOf - { dogAllOfBreed = Nothing - } - -- ** EnumArrays -- | EnumArrays data EnumArrays = EnumArrays diff --git a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/ModelLens.hs b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/ModelLens.hs index 32c3b215980..79f2838cdc3 100644 --- a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/ModelLens.hs +++ b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/ModelLens.hs @@ -252,15 +252,6 @@ bigCatKindL f BigCat{..} = (\bigCatKind -> BigCat { bigCatKind, ..} ) <$> f bigC --- * BigCatAllOf - --- | 'bigCatAllOfKind' Lens -bigCatAllOfKindL :: Lens_' BigCatAllOf (Maybe E'Kind) -bigCatAllOfKindL f BigCatAllOf{..} = (\bigCatAllOfKind -> BigCatAllOf { bigCatAllOfKind, ..} ) <$> f bigCatAllOfKind -{-# INLINE bigCatAllOfKindL #-} - - - -- * Capitalization -- | 'capitalizationSmallCamel' Lens @@ -314,15 +305,6 @@ catDeclawedL f Cat{..} = (\catDeclawed -> Cat { catDeclawed, ..} ) <$> f catDecl --- * CatAllOf - --- | 'catAllOfDeclawed' Lens -catAllOfDeclawedL :: Lens_' CatAllOf (Maybe Bool) -catAllOfDeclawedL f CatAllOf{..} = (\catAllOfDeclawed -> CatAllOf { catAllOfDeclawed, ..} ) <$> f catAllOfDeclawed -{-# INLINE catAllOfDeclawedL #-} - - - -- * Category -- | 'categoryId' Lens @@ -374,15 +356,6 @@ dogBreedL f Dog{..} = (\dogBreed -> Dog { dogBreed, ..} ) <$> f dogBreed --- * DogAllOf - --- | 'dogAllOfBreed' Lens -dogAllOfBreedL :: Lens_' DogAllOf (Maybe Text) -dogAllOfBreedL f DogAllOf{..} = (\dogAllOfBreed -> DogAllOf { dogAllOfBreed, ..} ) <$> f dogAllOfBreed -{-# INLINE dogAllOfBreedL #-} - - - -- * EnumArrays -- | 'enumArraysJustSymbol' Lens diff --git a/samples/client/petstore/haskell-http-client/openapi.yaml b/samples/client/petstore/haskell-http-client/openapi.yaml index ee7adb4d6c6..cc8ec0eb7b9 100644 --- a/samples/client/petstore/haskell-http-client/openapi.yaml +++ b/samples/client/petstore/haskell-http-client/openapi.yaml @@ -1303,15 +1303,29 @@ components: Dog: allOf: - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Dog_allOf' + - properties: + breed: + type: string + type: object Cat: allOf: - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Cat_allOf' + - properties: + declawed: + type: boolean + type: object BigCat: allOf: - $ref: '#/components/schemas/Cat' - - $ref: '#/components/schemas/BigCat_allOf' + - properties: + kind: + enum: + - lions + - tigers + - leopards + - jaguars + type: string + type: object Animal: discriminator: propertyName: className @@ -2104,29 +2118,6 @@ components: required: - requiredFile type: object - Dog_allOf: - properties: - breed: - type: string - type: object - example: null - Cat_allOf: - properties: - declawed: - type: boolean - type: object - example: null - BigCat_allOf: - properties: - kind: - enum: - - lions - - tigers - - leopards - - jaguars - type: string - type: object - example: null securitySchemes: petstore_auth: flows: diff --git a/samples/client/petstore/haskell-http-client/tests/Instances.hs b/samples/client/petstore/haskell-http-client/tests/Instances.hs index dd4b65d938e..adac0d49e16 100644 --- a/samples/client/petstore/haskell-http-client/tests/Instances.hs +++ b/samples/client/petstore/haskell-http-client/tests/Instances.hs @@ -243,14 +243,6 @@ genBigCat n = <*> arbitraryReducedMaybe n -- bigCatDeclawed :: Maybe Bool <*> arbitraryReducedMaybe n -- bigCatKind :: Maybe E'Kind -instance Arbitrary BigCatAllOf where - arbitrary = sized genBigCatAllOf - -genBigCatAllOf :: Int -> Gen BigCatAllOf -genBigCatAllOf n = - BigCatAllOf - <$> arbitraryReducedMaybe n -- bigCatAllOfKind :: Maybe E'Kind - instance Arbitrary Capitalization where arbitrary = sized genCapitalization @@ -274,14 +266,6 @@ genCat n = <*> arbitraryReducedMaybe n -- catColor :: Maybe Text <*> arbitraryReducedMaybe n -- catDeclawed :: Maybe Bool -instance Arbitrary CatAllOf where - arbitrary = sized genCatAllOf - -genCatAllOf :: Int -> Gen CatAllOf -genCatAllOf n = - CatAllOf - <$> arbitraryReducedMaybe n -- catAllOfDeclawed :: Maybe Bool - instance Arbitrary Category where arbitrary = sized genCategory @@ -317,14 +301,6 @@ genDog n = <*> arbitraryReducedMaybe n -- dogColor :: Maybe Text <*> arbitraryReducedMaybe n -- dogBreed :: Maybe Text -instance Arbitrary DogAllOf where - arbitrary = sized genDogAllOf - -genDogAllOf :: Int -> Gen DogAllOf -genDogAllOf n = - DogAllOf - <$> arbitraryReducedMaybe n -- dogAllOfBreed :: Maybe Text - instance Arbitrary EnumArrays where arbitrary = sized genEnumArrays diff --git a/samples/client/petstore/haskell-http-client/tests/Test.hs b/samples/client/petstore/haskell-http-client/tests/Test.hs index bcb0761e838..f7bcc784059 100644 --- a/samples/client/petstore/haskell-http-client/tests/Test.hs +++ b/samples/client/petstore/haskell-http-client/tests/Test.hs @@ -34,15 +34,12 @@ main = propMimeEq MimeJSON (Proxy :: Proxy ArrayOfNumberOnly) propMimeEq MimeJSON (Proxy :: Proxy ArrayTest) propMimeEq MimeJSON (Proxy :: Proxy BigCat) - propMimeEq MimeJSON (Proxy :: Proxy BigCatAllOf) propMimeEq MimeJSON (Proxy :: Proxy Capitalization) propMimeEq MimeJSON (Proxy :: Proxy Cat) - propMimeEq MimeJSON (Proxy :: Proxy CatAllOf) propMimeEq MimeJSON (Proxy :: Proxy Category) propMimeEq MimeJSON (Proxy :: Proxy ClassModel) propMimeEq MimeJSON (Proxy :: Proxy Client) propMimeEq MimeJSON (Proxy :: Proxy Dog) - propMimeEq MimeJSON (Proxy :: Proxy DogAllOf) propMimeEq MimeJSON (Proxy :: Proxy EnumArrays) propMimeEq MimeJSON (Proxy :: Proxy EnumClass) propMimeEq MimeJSON (Proxy :: Proxy EnumTest) diff --git a/samples/client/petstore/java-helidon-client/mp/.openapi-generator/FILES b/samples/client/petstore/java-helidon-client/mp/.openapi-generator/FILES index 34eacc844c5..3355ff7560c 100644 --- a/samples/client/petstore/java-helidon-client/mp/.openapi-generator/FILES +++ b/samples/client/petstore/java-helidon-client/mp/.openapi-generator/FILES @@ -8,14 +8,12 @@ docs/ArrayOfNumberOnly.md docs/ArrayTest.md docs/Capitalization.md docs/Cat.md -docs/CatAllOf.md docs/Category.md docs/ClassModel.md docs/Client.md docs/DefaultApi.md docs/DeprecatedObject.md docs/Dog.md -docs/DogAllOf.md docs/EnumArrays.md docs/EnumClass.md docs/EnumTest.md @@ -75,13 +73,11 @@ src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java src/main/java/org/openapitools/client/model/ArrayTest.java src/main/java/org/openapitools/client/model/Capitalization.java src/main/java/org/openapitools/client/model/Cat.java -src/main/java/org/openapitools/client/model/CatAllOf.java src/main/java/org/openapitools/client/model/Category.java src/main/java/org/openapitools/client/model/ClassModel.java src/main/java/org/openapitools/client/model/Client.java src/main/java/org/openapitools/client/model/DeprecatedObject.java src/main/java/org/openapitools/client/model/Dog.java -src/main/java/org/openapitools/client/model/DogAllOf.java src/main/java/org/openapitools/client/model/EnumArrays.java src/main/java/org/openapitools/client/model/EnumClass.java src/main/java/org/openapitools/client/model/EnumTest.java diff --git a/samples/client/petstore/java-helidon-client/mp/docs/CatAllOf.md b/samples/client/petstore/java-helidon-client/mp/docs/CatAllOf.md deleted file mode 100644 index 926bc0abd78..00000000000 --- a/samples/client/petstore/java-helidon-client/mp/docs/CatAllOf.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# CatAllOf - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**declawed** | **Boolean** | | [optional] | - - - diff --git a/samples/client/petstore/java-helidon-client/mp/docs/DogAllOf.md b/samples/client/petstore/java-helidon-client/mp/docs/DogAllOf.md deleted file mode 100644 index d4e4ea0d548..00000000000 --- a/samples/client/petstore/java-helidon-client/mp/docs/DogAllOf.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# DogAllOf - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**breed** | **String** | | [optional] | - - - diff --git a/samples/client/petstore/java-helidon-client/mp/src/main/java/org/openapitools/client/model/CatAllOf.java b/samples/client/petstore/java-helidon-client/mp/src/main/java/org/openapitools/client/model/CatAllOf.java deleted file mode 100644 index 2b54aad5ba3..00000000000 --- a/samples/client/petstore/java-helidon-client/mp/src/main/java/org/openapitools/client/model/CatAllOf.java +++ /dev/null @@ -1,73 +0,0 @@ -/** - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; - - - - -public class CatAllOf { - - private Boolean declawed; - - /** - * Get declawed - * @return declawed - **/ - public Boolean getDeclawed() { - return declawed; - } - - /** - * Set declawed - **/ - public void setDeclawed(Boolean declawed) { - this.declawed = declawed; - } - - public CatAllOf declawed(Boolean declawed) { - this.declawed = declawed; - return this; - } - - - /** - * Create a string representation of this pojo. - **/ - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CatAllOf {\n"); - - sb.append(" declawed: ").append(toIndentedString(declawed)).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 static String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/client/petstore/java-helidon-client/mp/src/main/java/org/openapitools/client/model/DogAllOf.java b/samples/client/petstore/java-helidon-client/mp/src/main/java/org/openapitools/client/model/DogAllOf.java deleted file mode 100644 index 5dc63ce0380..00000000000 --- a/samples/client/petstore/java-helidon-client/mp/src/main/java/org/openapitools/client/model/DogAllOf.java +++ /dev/null @@ -1,73 +0,0 @@ -/** - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; - - - - -public class DogAllOf { - - private String breed; - - /** - * Get breed - * @return breed - **/ - public String getBreed() { - return breed; - } - - /** - * Set breed - **/ - public void setBreed(String breed) { - this.breed = breed; - } - - public DogAllOf breed(String breed) { - this.breed = breed; - return this; - } - - - /** - * Create a string representation of this pojo. - **/ - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DogAllOf {\n"); - - sb.append(" breed: ").append(toIndentedString(breed)).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 static String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/client/petstore/java-helidon-client/mp/src/test/java/org/openapitools/client/model/CatAllOfTest.java b/samples/client/petstore/java-helidon-client/mp/src/test/java/org/openapitools/client/model/CatAllOfTest.java deleted file mode 100644 index 3772925dd61..00000000000 --- a/samples/client/petstore/java-helidon-client/mp/src/test/java/org/openapitools/client/model/CatAllOfTest.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; - -import org.junit.jupiter.api.Test; - - -/** - * Model tests for CatAllOf - */ -public class CatAllOfTest { - private final CatAllOf model = new CatAllOf(); - - /** - * Model tests for CatAllOf - */ - @Test - public void testCatAllOf() { - // TODO: test CatAllOf - } - - /** - * Test the property 'declawed' - */ - @Test - public void declawedTest() { - // TODO: test declawed - } - -} diff --git a/samples/client/petstore/java-helidon-client/mp/src/test/java/org/openapitools/client/model/DogAllOfTest.java b/samples/client/petstore/java-helidon-client/mp/src/test/java/org/openapitools/client/model/DogAllOfTest.java deleted file mode 100644 index 16066cd03f1..00000000000 --- a/samples/client/petstore/java-helidon-client/mp/src/test/java/org/openapitools/client/model/DogAllOfTest.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; - -import org.junit.jupiter.api.Test; - - -/** - * Model tests for DogAllOf - */ -public class DogAllOfTest { - private final DogAllOf model = new DogAllOf(); - - /** - * Model tests for DogAllOf - */ - @Test - public void testDogAllOf() { - // TODO: test DogAllOf - } - - /** - * Test the property 'breed' - */ - @Test - public void breedTest() { - // TODO: test breed - } - -} diff --git a/samples/client/petstore/java-helidon-client/se/.openapi-generator/FILES b/samples/client/petstore/java-helidon-client/se/.openapi-generator/FILES index 3aad2e95997..4fcd023785c 100644 --- a/samples/client/petstore/java-helidon-client/se/.openapi-generator/FILES +++ b/samples/client/petstore/java-helidon-client/se/.openapi-generator/FILES @@ -8,14 +8,12 @@ docs/ArrayOfNumberOnly.md docs/ArrayTest.md docs/Capitalization.md docs/Cat.md -docs/CatAllOf.md docs/Category.md docs/ClassModel.md docs/Client.md docs/DefaultApi.md docs/DeprecatedObject.md docs/Dog.md -docs/DogAllOf.md docs/EnumArrays.md docs/EnumClass.md docs/EnumTest.md @@ -84,13 +82,11 @@ src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java src/main/java/org/openapitools/client/model/ArrayTest.java src/main/java/org/openapitools/client/model/Capitalization.java src/main/java/org/openapitools/client/model/Cat.java -src/main/java/org/openapitools/client/model/CatAllOf.java src/main/java/org/openapitools/client/model/Category.java src/main/java/org/openapitools/client/model/ClassModel.java src/main/java/org/openapitools/client/model/Client.java src/main/java/org/openapitools/client/model/DeprecatedObject.java src/main/java/org/openapitools/client/model/Dog.java -src/main/java/org/openapitools/client/model/DogAllOf.java src/main/java/org/openapitools/client/model/EnumArrays.java src/main/java/org/openapitools/client/model/EnumClass.java src/main/java/org/openapitools/client/model/EnumTest.java diff --git a/samples/client/petstore/java-helidon-client/se/docs/CatAllOf.md b/samples/client/petstore/java-helidon-client/se/docs/CatAllOf.md deleted file mode 100644 index 926bc0abd78..00000000000 --- a/samples/client/petstore/java-helidon-client/se/docs/CatAllOf.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# CatAllOf - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**declawed** | **Boolean** | | [optional] | - - - diff --git a/samples/client/petstore/java-helidon-client/se/docs/DogAllOf.md b/samples/client/petstore/java-helidon-client/se/docs/DogAllOf.md deleted file mode 100644 index d4e4ea0d548..00000000000 --- a/samples/client/petstore/java-helidon-client/se/docs/DogAllOf.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# DogAllOf - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**breed** | **String** | | [optional] | - - - diff --git a/samples/client/petstore/java-helidon-client/se/src/main/java/org/openapitools/client/model/CatAllOf.java b/samples/client/petstore/java-helidon-client/se/src/main/java/org/openapitools/client/model/CatAllOf.java deleted file mode 100644 index 2b54aad5ba3..00000000000 --- a/samples/client/petstore/java-helidon-client/se/src/main/java/org/openapitools/client/model/CatAllOf.java +++ /dev/null @@ -1,73 +0,0 @@ -/** - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; - - - - -public class CatAllOf { - - private Boolean declawed; - - /** - * Get declawed - * @return declawed - **/ - public Boolean getDeclawed() { - return declawed; - } - - /** - * Set declawed - **/ - public void setDeclawed(Boolean declawed) { - this.declawed = declawed; - } - - public CatAllOf declawed(Boolean declawed) { - this.declawed = declawed; - return this; - } - - - /** - * Create a string representation of this pojo. - **/ - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CatAllOf {\n"); - - sb.append(" declawed: ").append(toIndentedString(declawed)).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 static String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/client/petstore/java-helidon-client/se/src/main/java/org/openapitools/client/model/DogAllOf.java b/samples/client/petstore/java-helidon-client/se/src/main/java/org/openapitools/client/model/DogAllOf.java deleted file mode 100644 index 5dc63ce0380..00000000000 --- a/samples/client/petstore/java-helidon-client/se/src/main/java/org/openapitools/client/model/DogAllOf.java +++ /dev/null @@ -1,73 +0,0 @@ -/** - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; - - - - -public class DogAllOf { - - private String breed; - - /** - * Get breed - * @return breed - **/ - public String getBreed() { - return breed; - } - - /** - * Set breed - **/ - public void setBreed(String breed) { - this.breed = breed; - } - - public DogAllOf breed(String breed) { - this.breed = breed; - return this; - } - - - /** - * Create a string representation of this pojo. - **/ - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DogAllOf {\n"); - - sb.append(" breed: ").append(toIndentedString(breed)).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 static String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/client/petstore/java-helidon-client/se/src/test/java/org/openapitools/client/model/CatAllOfTest.java b/samples/client/petstore/java-helidon-client/se/src/test/java/org/openapitools/client/model/CatAllOfTest.java deleted file mode 100644 index 3772925dd61..00000000000 --- a/samples/client/petstore/java-helidon-client/se/src/test/java/org/openapitools/client/model/CatAllOfTest.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; - -import org.junit.jupiter.api.Test; - - -/** - * Model tests for CatAllOf - */ -public class CatAllOfTest { - private final CatAllOf model = new CatAllOf(); - - /** - * Model tests for CatAllOf - */ - @Test - public void testCatAllOf() { - // TODO: test CatAllOf - } - - /** - * Test the property 'declawed' - */ - @Test - public void declawedTest() { - // TODO: test declawed - } - -} diff --git a/samples/client/petstore/java-helidon-client/se/src/test/java/org/openapitools/client/model/DogAllOfTest.java b/samples/client/petstore/java-helidon-client/se/src/test/java/org/openapitools/client/model/DogAllOfTest.java deleted file mode 100644 index 16066cd03f1..00000000000 --- a/samples/client/petstore/java-helidon-client/se/src/test/java/org/openapitools/client/model/DogAllOfTest.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; - -import org.junit.jupiter.api.Test; - - -/** - * Model tests for DogAllOf - */ -public class DogAllOfTest { - private final DogAllOf model = new DogAllOf(); - - /** - * Model tests for DogAllOf - */ - @Test - public void testDogAllOf() { - // TODO: test DogAllOf - } - - /** - * Test the property 'breed' - */ - @Test - public void breedTest() { - // TODO: test breed - } - -} diff --git a/samples/client/petstore/java-micronaut-client/.openapi-generator/FILES b/samples/client/petstore/java-micronaut-client/.openapi-generator/FILES index a39007e99a4..d57d2f0f4d0 100644 --- a/samples/client/petstore/java-micronaut-client/.openapi-generator/FILES +++ b/samples/client/petstore/java-micronaut-client/.openapi-generator/FILES @@ -23,14 +23,11 @@ docs/models/ArrayOfArrayOfNumberOnly.md docs/models/ArrayOfNumberOnly.md docs/models/ArrayTest.md docs/models/BigCat.md -docs/models/BigCatAllOf.md docs/models/Capitalization.md docs/models/Cat.md -docs/models/CatAllOf.md docs/models/Category.md docs/models/ClassModel.md docs/models/Dog.md -docs/models/DogAllOf.md docs/models/EnumArrays.md docs/models/EnumClass.md docs/models/EnumTest.md @@ -85,14 +82,11 @@ src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java src/main/java/org/openapitools/model/ArrayOfNumberOnly.java src/main/java/org/openapitools/model/ArrayTest.java src/main/java/org/openapitools/model/BigCat.java -src/main/java/org/openapitools/model/BigCatAllOf.java src/main/java/org/openapitools/model/Capitalization.java src/main/java/org/openapitools/model/Cat.java -src/main/java/org/openapitools/model/CatAllOf.java src/main/java/org/openapitools/model/Category.java src/main/java/org/openapitools/model/ClassModel.java src/main/java/org/openapitools/model/Dog.java -src/main/java/org/openapitools/model/DogAllOf.java src/main/java/org/openapitools/model/EnumArrays.java src/main/java/org/openapitools/model/EnumClass.java src/main/java/org/openapitools/model/EnumTest.java diff --git a/samples/client/petstore/java-micronaut-client/docs/models/BigCatAllOf.md b/samples/client/petstore/java-micronaut-client/docs/models/BigCatAllOf.md deleted file mode 100644 index 6e72649489a..00000000000 --- a/samples/client/petstore/java-micronaut-client/docs/models/BigCatAllOf.md +++ /dev/null @@ -1,22 +0,0 @@ - - -# BigCatAllOf - -The class is defined in **[BigCatAllOf.java](../../src/main/java/org/openapitools/model/BigCatAllOf.java)** - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**kind** | [**KindEnum**](#KindEnum) | | [optional property] - -## KindEnum - -Name | Value ----- | ----- -LIONS | `"lions"` -TIGERS | `"tigers"` -LEOPARDS | `"leopards"` -JAGUARS | `"jaguars"` - - diff --git a/samples/client/petstore/java-micronaut-client/docs/models/CatAllOf.md b/samples/client/petstore/java-micronaut-client/docs/models/CatAllOf.md deleted file mode 100644 index e93b6a351fd..00000000000 --- a/samples/client/petstore/java-micronaut-client/docs/models/CatAllOf.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# CatAllOf - -The class is defined in **[CatAllOf.java](../../src/main/java/org/openapitools/model/CatAllOf.java)** - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**declawed** | `Boolean` | | [optional property] - - - diff --git a/samples/client/petstore/java-micronaut-client/docs/models/DogAllOf.md b/samples/client/petstore/java-micronaut-client/docs/models/DogAllOf.md deleted file mode 100644 index 6e25529833b..00000000000 --- a/samples/client/petstore/java-micronaut-client/docs/models/DogAllOf.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# DogAllOf - -The class is defined in **[DogAllOf.java](../../src/main/java/org/openapitools/model/DogAllOf.java)** - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**breed** | `String` | | [optional property] - - - diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/BigCatAllOf.java deleted file mode 100644 index 526c109adc1..00000000000 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/BigCatAllOf.java +++ /dev/null @@ -1,135 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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 java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.*; - -import javax.validation.constraints.*; -import javax.validation.Valid; -import io.micronaut.core.annotation.*; -import javax.annotation.Generated; - -/** - * BigCatAllOf - */ -@JsonPropertyOrder({ - BigCatAllOf.JSON_PROPERTY_KIND -}) -@JsonTypeName("BigCat_allOf") -@Generated(value="org.openapitools.codegen.languages.JavaMicronautClientCodegen") -@Introspected -public class BigCatAllOf { - /** - * Gets or Sets kind - */ - public enum KindEnum { - LIONS("lions"), - TIGERS("tigers"), - LEOPARDS("leopards"), - JAGUARS("jaguars"); - - private String value; - - KindEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static KindEnum fromValue(String value) { - for (KindEnum b : KindEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - public static final String JSON_PROPERTY_KIND = "kind"; - private KindEnum kind; - - public BigCatAllOf() { - } - public BigCatAllOf kind(KindEnum kind) { - this.kind = kind; - return this; - } - - /** - * Get kind - * @return kind - **/ - @Nullable - @JsonProperty(JSON_PROPERTY_KIND) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public KindEnum getKind() { - return kind; - } - - @JsonProperty(JSON_PROPERTY_KIND) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setKind(KindEnum kind) { - this.kind = kind; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BigCatAllOf bigCatAllOf = (BigCatAllOf) o; - return Objects.equals(this.kind, bigCatAllOf.kind); - } - - @Override - public int hashCode() { - return Objects.hash(kind); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BigCatAllOf {\n"); - sb.append(" kind: ").append(toIndentedString(kind)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/CatAllOf.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/CatAllOf.java deleted file mode 100644 index 85c7c389bb0..00000000000 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/CatAllOf.java +++ /dev/null @@ -1,100 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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 java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.*; - -import javax.validation.constraints.*; -import javax.validation.Valid; -import io.micronaut.core.annotation.*; -import javax.annotation.Generated; - -/** - * CatAllOf - */ -@JsonPropertyOrder({ - CatAllOf.JSON_PROPERTY_DECLAWED -}) -@JsonTypeName("Cat_allOf") -@Generated(value="org.openapitools.codegen.languages.JavaMicronautClientCodegen") -@Introspected -public class CatAllOf { - public static final String JSON_PROPERTY_DECLAWED = "declawed"; - private Boolean declawed; - - public CatAllOf() { - } - public CatAllOf declawed(Boolean declawed) { - this.declawed = declawed; - return this; - } - - /** - * Get declawed - * @return declawed - **/ - @Nullable - @JsonProperty(JSON_PROPERTY_DECLAWED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getDeclawed() { - return declawed; - } - - @JsonProperty(JSON_PROPERTY_DECLAWED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDeclawed(Boolean declawed) { - this.declawed = declawed; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CatAllOf catAllOf = (CatAllOf) o; - return Objects.equals(this.declawed, catAllOf.declawed); - } - - @Override - public int hashCode() { - return Objects.hash(declawed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CatAllOf {\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/DogAllOf.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/DogAllOf.java deleted file mode 100644 index 56c83ee99a4..00000000000 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/DogAllOf.java +++ /dev/null @@ -1,100 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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 java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.*; - -import javax.validation.constraints.*; -import javax.validation.Valid; -import io.micronaut.core.annotation.*; -import javax.annotation.Generated; - -/** - * DogAllOf - */ -@JsonPropertyOrder({ - DogAllOf.JSON_PROPERTY_BREED -}) -@JsonTypeName("Dog_allOf") -@Generated(value="org.openapitools.codegen.languages.JavaMicronautClientCodegen") -@Introspected -public class DogAllOf { - public static final String JSON_PROPERTY_BREED = "breed"; - private String breed; - - public DogAllOf() { - } - public DogAllOf breed(String breed) { - this.breed = breed; - return this; - } - - /** - * Get breed - * @return breed - **/ - @Nullable - @JsonProperty(JSON_PROPERTY_BREED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getBreed() { - return breed; - } - - @JsonProperty(JSON_PROPERTY_BREED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setBreed(String breed) { - this.breed = breed; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DogAllOf dogAllOf = (DogAllOf) o; - return Objects.equals(this.breed, dogAllOf.breed); - } - - @Override - public int hashCode() { - return Objects.hash(breed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DogAllOf {\n"); - sb.append(" breed: ").append(toIndentedString(breed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/BigCatAllOfSpec.groovy b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/BigCatAllOfSpec.groovy deleted file mode 100644 index 4885fd0eed9..00000000000 --- a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/BigCatAllOfSpec.groovy +++ /dev/null @@ -1,29 +0,0 @@ -package org.openapitools.model - -import com.fasterxml.jackson.annotation.JsonTypeName -import io.micronaut.test.extensions.spock.annotation.MicronautTest -import spock.lang.Specification -import jakarta.inject.Inject - -/** - * Model tests for BigCatAllOf - */ -@MicronautTest -public class BigCatAllOfSpec extends Specification { - private final BigCatAllOf model = null - - /** - * Model tests for BigCatAllOf - */ - void 'BigCatAllOf test'() { - // TODO: test BigCatAllOf - } - - /** - * Test the property 'kind' - */ - void 'BigCatAllOf property kind test'() { - // TODO: test kind property of BigCatAllOf - } - -} diff --git a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/BigCatSpec.groovy b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/BigCatSpec.groovy index 9460011c0cd..e86d3263a75 100644 --- a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/BigCatSpec.groovy +++ b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/BigCatSpec.groovy @@ -1,6 +1,5 @@ package org.openapitools.model -import org.openapitools.model.BigCatAllOf import org.openapitools.model.Cat import io.micronaut.test.extensions.spock.annotation.MicronautTest import spock.lang.Specification diff --git a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/CatAllOfSpec.groovy b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/CatAllOfSpec.groovy deleted file mode 100644 index ba77d196d54..00000000000 --- a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/CatAllOfSpec.groovy +++ /dev/null @@ -1,29 +0,0 @@ -package org.openapitools.model - -import com.fasterxml.jackson.annotation.JsonTypeName -import io.micronaut.test.extensions.spock.annotation.MicronautTest -import spock.lang.Specification -import jakarta.inject.Inject - -/** - * Model tests for CatAllOf - */ -@MicronautTest -public class CatAllOfSpec extends Specification { - private final CatAllOf model = null - - /** - * Model tests for CatAllOf - */ - void 'CatAllOf test'() { - // TODO: test CatAllOf - } - - /** - * Test the property 'declawed' - */ - void 'CatAllOf property declawed test'() { - // TODO: test declawed property of CatAllOf - } - -} diff --git a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/CatSpec.groovy b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/CatSpec.groovy index 5b36d718137..f45a3b51f77 100644 --- a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/CatSpec.groovy +++ b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/CatSpec.groovy @@ -1,7 +1,6 @@ package org.openapitools.model import org.openapitools.model.Animal -import org.openapitools.model.CatAllOf import io.micronaut.test.extensions.spock.annotation.MicronautTest import spock.lang.Specification import jakarta.inject.Inject diff --git a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/DogAllOfSpec.groovy b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/DogAllOfSpec.groovy deleted file mode 100644 index a16c637fb87..00000000000 --- a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/DogAllOfSpec.groovy +++ /dev/null @@ -1,29 +0,0 @@ -package org.openapitools.model - -import com.fasterxml.jackson.annotation.JsonTypeName -import io.micronaut.test.extensions.spock.annotation.MicronautTest -import spock.lang.Specification -import jakarta.inject.Inject - -/** - * Model tests for DogAllOf - */ -@MicronautTest -public class DogAllOfSpec extends Specification { - private final DogAllOf model = null - - /** - * Model tests for DogAllOf - */ - void 'DogAllOf test'() { - // TODO: test DogAllOf - } - - /** - * Test the property 'breed' - */ - void 'DogAllOf property breed test'() { - // TODO: test breed property of DogAllOf - } - -} diff --git a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/DogSpec.groovy b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/DogSpec.groovy index af1fd87c9a1..893364e7cb8 100644 --- a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/DogSpec.groovy +++ b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/DogSpec.groovy @@ -1,7 +1,6 @@ package org.openapitools.model import org.openapitools.model.Animal -import org.openapitools.model.DogAllOf import io.micronaut.test.extensions.spock.annotation.MicronautTest import spock.lang.Specification import jakarta.inject.Inject diff --git a/samples/client/petstore/java/apache-httpclient/.openapi-generator/FILES b/samples/client/petstore/java/apache-httpclient/.openapi-generator/FILES index 87c769a2506..bf886d21ded 100644 --- a/samples/client/petstore/java/apache-httpclient/.openapi-generator/FILES +++ b/samples/client/petstore/java/apache-httpclient/.openapi-generator/FILES @@ -14,14 +14,12 @@ docs/ArrayOfNumberOnly.md docs/ArrayTest.md docs/Capitalization.md docs/Cat.md -docs/CatAllOf.md docs/Category.md docs/ClassModel.md docs/Client.md docs/DefaultApi.md docs/DeprecatedObject.md docs/Dog.md -docs/DogAllOf.md docs/EnumArrays.md docs/EnumClass.md docs/EnumTest.md @@ -100,13 +98,11 @@ src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java src/main/java/org/openapitools/client/model/ArrayTest.java src/main/java/org/openapitools/client/model/Capitalization.java src/main/java/org/openapitools/client/model/Cat.java -src/main/java/org/openapitools/client/model/CatAllOf.java src/main/java/org/openapitools/client/model/Category.java src/main/java/org/openapitools/client/model/ClassModel.java src/main/java/org/openapitools/client/model/Client.java src/main/java/org/openapitools/client/model/DeprecatedObject.java src/main/java/org/openapitools/client/model/Dog.java -src/main/java/org/openapitools/client/model/DogAllOf.java src/main/java/org/openapitools/client/model/EnumArrays.java src/main/java/org/openapitools/client/model/EnumClass.java src/main/java/org/openapitools/client/model/EnumTest.java diff --git a/samples/client/petstore/java/apache-httpclient/README.md b/samples/client/petstore/java/apache-httpclient/README.md index c4e087cdfea..3a2c3df03fa 100644 --- a/samples/client/petstore/java/apache-httpclient/README.md +++ b/samples/client/petstore/java/apache-httpclient/README.md @@ -160,13 +160,11 @@ Class | Method | HTTP request | Description - [ArrayTest](docs/ArrayTest.md) - [Capitalization](docs/Capitalization.md) - [Cat](docs/Cat.md) - - [CatAllOf](docs/CatAllOf.md) - [Category](docs/Category.md) - [ClassModel](docs/ClassModel.md) - [Client](docs/Client.md) - [DeprecatedObject](docs/DeprecatedObject.md) - [Dog](docs/Dog.md) - - [DogAllOf](docs/DogAllOf.md) - [EnumArrays](docs/EnumArrays.md) - [EnumClass](docs/EnumClass.md) - [EnumTest](docs/EnumTest.md) diff --git a/samples/client/petstore/java/apache-httpclient/api/openapi.yaml b/samples/client/petstore/java/apache-httpclient/api/openapi.yaml index 80e871590a3..9f0affe779f 100644 --- a/samples/client/petstore/java/apache-httpclient/api/openapi.yaml +++ b/samples/client/petstore/java/apache-httpclient/api/openapi.yaml @@ -1515,11 +1515,17 @@ components: Dog: allOf: - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Dog_allOf' + - properties: + breed: + type: string + type: object Cat: allOf: - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Cat_allOf' + - properties: + declawed: + type: boolean + type: object Animal: discriminator: mapping: @@ -2159,18 +2165,6 @@ components: required: - requiredFile type: object - Dog_allOf: - properties: - breed: - type: string - type: object - example: null - Cat_allOf: - properties: - declawed: - type: boolean - type: object - example: null securitySchemes: petstore_auth: flows: diff --git a/samples/client/petstore/java/apache-httpclient/docs/BigCatAllOf.md b/samples/client/petstore/java/apache-httpclient/docs/BigCatAllOf.md deleted file mode 100644 index 2bee213a607..00000000000 --- a/samples/client/petstore/java/apache-httpclient/docs/BigCatAllOf.md +++ /dev/null @@ -1,24 +0,0 @@ - - -# BigCatAllOf - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**kind** | [**KindEnum**](#KindEnum) | | [optional] | - - - -## Enum: KindEnum - -| Name | Value | -|---- | -----| -| LIONS | "lions" | -| TIGERS | "tigers" | -| LEOPARDS | "leopards" | -| JAGUARS | "jaguars" | - - - diff --git a/samples/client/petstore/java/apache-httpclient/docs/CatAllOf.md b/samples/client/petstore/java/apache-httpclient/docs/CatAllOf.md deleted file mode 100644 index 926bc0abd78..00000000000 --- a/samples/client/petstore/java/apache-httpclient/docs/CatAllOf.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# CatAllOf - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**declawed** | **Boolean** | | [optional] | - - - diff --git a/samples/client/petstore/java/apache-httpclient/docs/DogAllOf.md b/samples/client/petstore/java/apache-httpclient/docs/DogAllOf.md deleted file mode 100644 index d4e4ea0d548..00000000000 --- a/samples/client/petstore/java/apache-httpclient/docs/DogAllOf.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# DogAllOf - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**breed** | **String** | | [optional] | - - - diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/BigCatAllOf.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/BigCatAllOf.java deleted file mode 100644 index 33d8deb1c1b..00000000000 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/BigCatAllOf.java +++ /dev/null @@ -1,144 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** - * BigCatAllOf - */ -@JsonPropertyOrder({ - BigCatAllOf.JSON_PROPERTY_KIND -}) -@JsonTypeName("BigCat_allOf") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class BigCatAllOf { - /** - * Gets or Sets kind - */ - public enum KindEnum { - LIONS("lions"), - - TIGERS("tigers"), - - LEOPARDS("leopards"), - - JAGUARS("jaguars"); - - private String value; - - KindEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static KindEnum fromValue(String value) { - for (KindEnum b : KindEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - public static final String JSON_PROPERTY_KIND = "kind"; - private KindEnum kind; - - public BigCatAllOf() { - } - - public BigCatAllOf kind(KindEnum kind) { - - this.kind = kind; - return this; - } - - /** - * Get kind - * @return kind - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_KIND) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public KindEnum getKind() { - return kind; - } - - - @JsonProperty(JSON_PROPERTY_KIND) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setKind(KindEnum kind) { - this.kind = kind; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BigCatAllOf bigCatAllOf = (BigCatAllOf) o; - return Objects.equals(this.kind, bigCatAllOf.kind); - } - - @Override - public int hashCode() { - return Objects.hash(kind); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BigCatAllOf {\n"); - sb.append(" kind: ").append(toIndentedString(kind)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/CatAllOf.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/CatAllOf.java deleted file mode 100644 index 1739765e058..00000000000 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/CatAllOf.java +++ /dev/null @@ -1,152 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.io.UnsupportedEncodingException; -import java.net.URLEncoder; -import java.util.StringJoiner; - -/** - * CatAllOf - */ -@JsonPropertyOrder({ - CatAllOf.JSON_PROPERTY_DECLAWED -}) -@JsonTypeName("Cat_allOf") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CatAllOf { - public static final String JSON_PROPERTY_DECLAWED = "declawed"; - private Boolean declawed; - - public CatAllOf() { - } - - public CatAllOf declawed(Boolean declawed) { - - this.declawed = declawed; - return this; - } - - /** - * Get declawed - * @return declawed - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DECLAWED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Boolean getDeclawed() { - return declawed; - } - - - @JsonProperty(JSON_PROPERTY_DECLAWED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDeclawed(Boolean declawed) { - this.declawed = declawed; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CatAllOf catAllOf = (CatAllOf) o; - return Objects.equals(this.declawed, catAllOf.declawed); - } - - @Override - public int hashCode() { - return Objects.hash(declawed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CatAllOf {\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - /** - * Convert the instance into URL query string. - * - * @return URL query string - */ - public String toUrlQueryString() { - return toUrlQueryString(null); - } - - /** - * Convert the instance into URL query string. - * - * @param prefix prefix of the query string - * @return URL query string - */ - public String toUrlQueryString(String prefix) { - String suffix = ""; - String containerSuffix = ""; - String containerPrefix = ""; - if (prefix == null) { - // style=form, explode=true, e.g. /pet?name=cat&type=manx - prefix = ""; - } else { - // deepObject style e.g. /pet?id[name]=cat&id[type]=manx - prefix = prefix + "["; - suffix = "]"; - containerSuffix = "]"; - containerPrefix = "["; - } - - StringJoiner joiner = new StringJoiner("&"); - - // add `declawed` to the URL query string - if (getDeclawed() != null) { - try { - joiner.add(String.format("%sdeclawed%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDeclawed()), "UTF-8").replaceAll("\\+", "%20"))); - } catch (UnsupportedEncodingException e) { - // Should never happen, UTF-8 is always supported - throw new RuntimeException(e); - } - } - - return joiner.toString(); - } - -} - diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/DogAllOf.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/DogAllOf.java deleted file mode 100644 index 80a71d87578..00000000000 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/DogAllOf.java +++ /dev/null @@ -1,152 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.io.UnsupportedEncodingException; -import java.net.URLEncoder; -import java.util.StringJoiner; - -/** - * DogAllOf - */ -@JsonPropertyOrder({ - DogAllOf.JSON_PROPERTY_BREED -}) -@JsonTypeName("Dog_allOf") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DogAllOf { - public static final String JSON_PROPERTY_BREED = "breed"; - private String breed; - - public DogAllOf() { - } - - public DogAllOf breed(String breed) { - - this.breed = breed; - return this; - } - - /** - * Get breed - * @return breed - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_BREED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getBreed() { - return breed; - } - - - @JsonProperty(JSON_PROPERTY_BREED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setBreed(String breed) { - this.breed = breed; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DogAllOf dogAllOf = (DogAllOf) o; - return Objects.equals(this.breed, dogAllOf.breed); - } - - @Override - public int hashCode() { - return Objects.hash(breed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DogAllOf {\n"); - sb.append(" breed: ").append(toIndentedString(breed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - /** - * Convert the instance into URL query string. - * - * @return URL query string - */ - public String toUrlQueryString() { - return toUrlQueryString(null); - } - - /** - * Convert the instance into URL query string. - * - * @param prefix prefix of the query string - * @return URL query string - */ - public String toUrlQueryString(String prefix) { - String suffix = ""; - String containerSuffix = ""; - String containerPrefix = ""; - if (prefix == null) { - // style=form, explode=true, e.g. /pet?name=cat&type=manx - prefix = ""; - } else { - // deepObject style e.g. /pet?id[name]=cat&id[type]=manx - prefix = prefix + "["; - suffix = "]"; - containerSuffix = "]"; - containerPrefix = "["; - } - - StringJoiner joiner = new StringJoiner("&"); - - // add `breed` to the URL query string - if (getBreed() != null) { - try { - joiner.add(String.format("%sbreed%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getBreed()), "UTF-8").replaceAll("\\+", "%20"))); - } catch (UnsupportedEncodingException e) { - // Should never happen, UTF-8 is always supported - throw new RuntimeException(e); - } - } - - return joiner.toString(); - } - -} - diff --git a/samples/client/petstore/java/apache-httpclient/src/test/java/org/openapitools/client/model/BigCatAllOfTest.java b/samples/client/petstore/java/apache-httpclient/src/test/java/org/openapitools/client/model/BigCatAllOfTest.java deleted file mode 100644 index 8e291df45f1..00000000000 --- a/samples/client/petstore/java/apache-httpclient/src/test/java/org/openapitools/client/model/BigCatAllOfTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for BigCatAllOf - */ -public class BigCatAllOfTest { - private final BigCatAllOf model = new BigCatAllOf(); - - /** - * Model tests for BigCatAllOf - */ - @Test - public void testBigCatAllOf() { - // TODO: test BigCatAllOf - } - - /** - * Test the property 'kind' - */ - @Test - public void kindTest() { - // TODO: test kind - } - -} diff --git a/samples/client/petstore/java/apache-httpclient/src/test/java/org/openapitools/client/model/BigCatTest.java b/samples/client/petstore/java/apache-httpclient/src/test/java/org/openapitools/client/model/BigCatTest.java deleted file mode 100644 index f6c4621c9ea..00000000000 --- a/samples/client/petstore/java/apache-httpclient/src/test/java/org/openapitools/client/model/BigCatTest.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import org.openapitools.client.model.Cat; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for BigCat - */ -public class BigCatTest { - private final BigCat model = new BigCat(); - - /** - * Model tests for BigCat - */ - @Test - public void testBigCat() { - // TODO: test BigCat - } - - /** - * Test the property 'className' - */ - @Test - public void classNameTest() { - // TODO: test className - } - - /** - * Test the property 'color' - */ - @Test - public void colorTest() { - // TODO: test color - } - - /** - * Test the property 'declawed' - */ - @Test - public void declawedTest() { - // TODO: test declawed - } - - /** - * Test the property 'kind' - */ - @Test - public void kindTest() { - // TODO: test kind - } - -} diff --git a/samples/client/petstore/java/apache-httpclient/src/test/java/org/openapitools/client/model/CatAllOfTest.java b/samples/client/petstore/java/apache-httpclient/src/test/java/org/openapitools/client/model/CatAllOfTest.java deleted file mode 100644 index 269bdbe11b7..00000000000 --- a/samples/client/petstore/java/apache-httpclient/src/test/java/org/openapitools/client/model/CatAllOfTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for CatAllOf - */ -public class CatAllOfTest { - private final CatAllOf model = new CatAllOf(); - - /** - * Model tests for CatAllOf - */ - @Test - public void testCatAllOf() { - // TODO: test CatAllOf - } - - /** - * Test the property 'declawed' - */ - @Test - public void declawedTest() { - // TODO: test declawed - } - -} diff --git a/samples/client/petstore/java/apache-httpclient/src/test/java/org/openapitools/client/model/DogAllOfTest.java b/samples/client/petstore/java/apache-httpclient/src/test/java/org/openapitools/client/model/DogAllOfTest.java deleted file mode 100644 index dfa91c25ec8..00000000000 --- a/samples/client/petstore/java/apache-httpclient/src/test/java/org/openapitools/client/model/DogAllOfTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for DogAllOf - */ -public class DogAllOfTest { - private final DogAllOf model = new DogAllOf(); - - /** - * Model tests for DogAllOf - */ - @Test - public void testDogAllOf() { - // TODO: test DogAllOf - } - - /** - * Test the property 'breed' - */ - @Test - public void breedTest() { - // TODO: test breed - } - -} diff --git a/samples/client/petstore/java/feign-no-nullable/.openapi-generator/FILES b/samples/client/petstore/java/feign-no-nullable/.openapi-generator/FILES index e552623e40c..ea7aa352281 100644 --- a/samples/client/petstore/java/feign-no-nullable/.openapi-generator/FILES +++ b/samples/client/petstore/java/feign-no-nullable/.openapi-generator/FILES @@ -51,15 +51,12 @@ src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java src/main/java/org/openapitools/client/model/ArrayTest.java src/main/java/org/openapitools/client/model/BigCat.java -src/main/java/org/openapitools/client/model/BigCatAllOf.java src/main/java/org/openapitools/client/model/Capitalization.java src/main/java/org/openapitools/client/model/Cat.java -src/main/java/org/openapitools/client/model/CatAllOf.java src/main/java/org/openapitools/client/model/Category.java src/main/java/org/openapitools/client/model/ClassModel.java src/main/java/org/openapitools/client/model/Client.java src/main/java/org/openapitools/client/model/Dog.java -src/main/java/org/openapitools/client/model/DogAllOf.java src/main/java/org/openapitools/client/model/EnumArrays.java src/main/java/org/openapitools/client/model/EnumClass.java src/main/java/org/openapitools/client/model/EnumTest.java diff --git a/samples/client/petstore/java/feign-no-nullable/api/openapi.yaml b/samples/client/petstore/java/feign-no-nullable/api/openapi.yaml index e7e17402f6f..dbf370f445d 100644 --- a/samples/client/petstore/java/feign-no-nullable/api/openapi.yaml +++ b/samples/client/petstore/java/feign-no-nullable/api/openapi.yaml @@ -1364,15 +1364,29 @@ components: Dog: allOf: - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Dog_allOf' + - properties: + breed: + type: string + type: object Cat: allOf: - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Cat_allOf' + - properties: + declawed: + type: boolean + type: object BigCat: allOf: - $ref: '#/components/schemas/Cat' - - $ref: '#/components/schemas/BigCat_allOf' + - properties: + kind: + enum: + - lions + - tigers + - leopards + - jaguars + type: string + type: object Animal: discriminator: propertyName: className @@ -2165,29 +2179,6 @@ components: required: - requiredFile type: object - Dog_allOf: - properties: - breed: - type: string - type: object - example: null - Cat_allOf: - properties: - declawed: - type: boolean - type: object - example: null - BigCat_allOf: - properties: - kind: - enum: - - lions - - tigers - - leopards - - jaguars - type: string - type: object - example: null securitySchemes: petstore_auth: flows: diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/BigCatAllOf.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/BigCatAllOf.java deleted file mode 100644 index 5f3150ba5ba..00000000000 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/BigCatAllOf.java +++ /dev/null @@ -1,144 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** - * BigCatAllOf - */ -@JsonPropertyOrder({ - BigCatAllOf.JSON_PROPERTY_KIND -}) -@JsonTypeName("BigCat_allOf") -@javax.annotation.concurrent.Immutable -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class BigCatAllOf { - /** - * Gets or Sets kind - */ - public enum KindEnum { - LIONS("lions"), - - TIGERS("tigers"), - - LEOPARDS("leopards"), - - JAGUARS("jaguars"); - - private String value; - - KindEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static KindEnum fromValue(String value) { - for (KindEnum b : KindEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - public static final String JSON_PROPERTY_KIND = "kind"; - private KindEnum kind; - - public BigCatAllOf() { - } - - public BigCatAllOf kind(KindEnum kind) { - - this.kind = kind; - return this; - } - - /** - * Get kind - * @return kind - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_KIND) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public KindEnum getKind() { - return kind; - } - - - @JsonProperty(JSON_PROPERTY_KIND) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setKind(KindEnum kind) { - this.kind = kind; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BigCatAllOf bigCatAllOf = (BigCatAllOf) o; - return Objects.equals(this.kind, bigCatAllOf.kind); - } - - @Override - public int hashCode() { - return Objects.hash(kind); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BigCatAllOf {\n"); - sb.append(" kind: ").append(toIndentedString(kind)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/CatAllOf.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/CatAllOf.java deleted file mode 100644 index 39ca7362a05..00000000000 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/CatAllOf.java +++ /dev/null @@ -1,105 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** - * CatAllOf - */ -@JsonPropertyOrder({ - CatAllOf.JSON_PROPERTY_DECLAWED -}) -@JsonTypeName("Cat_allOf") -@javax.annotation.concurrent.Immutable -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CatAllOf { - public static final String JSON_PROPERTY_DECLAWED = "declawed"; - private Boolean declawed; - - public CatAllOf() { - } - - public CatAllOf declawed(Boolean declawed) { - - this.declawed = declawed; - return this; - } - - /** - * Get declawed - * @return declawed - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DECLAWED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Boolean isDeclawed() { - return declawed; - } - - - @JsonProperty(JSON_PROPERTY_DECLAWED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDeclawed(Boolean declawed) { - this.declawed = declawed; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CatAllOf catAllOf = (CatAllOf) o; - return Objects.equals(this.declawed, catAllOf.declawed); - } - - @Override - public int hashCode() { - return Objects.hash(declawed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CatAllOf {\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/DogAllOf.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/DogAllOf.java deleted file mode 100644 index 2bc9c54bc58..00000000000 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/model/DogAllOf.java +++ /dev/null @@ -1,105 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** - * DogAllOf - */ -@JsonPropertyOrder({ - DogAllOf.JSON_PROPERTY_BREED -}) -@JsonTypeName("Dog_allOf") -@javax.annotation.concurrent.Immutable -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DogAllOf { - public static final String JSON_PROPERTY_BREED = "breed"; - private String breed; - - public DogAllOf() { - } - - public DogAllOf breed(String breed) { - - this.breed = breed; - return this; - } - - /** - * Get breed - * @return breed - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_BREED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getBreed() { - return breed; - } - - - @JsonProperty(JSON_PROPERTY_BREED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setBreed(String breed) { - this.breed = breed; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DogAllOf dogAllOf = (DogAllOf) o; - return Objects.equals(this.breed, dogAllOf.breed); - } - - @Override - public int hashCode() { - return Objects.hash(breed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DogAllOf {\n"); - sb.append(" breed: ").append(toIndentedString(breed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/feign-no-nullable/src/test/java/org/openapitools/client/model/BigCatAllOfTest.java b/samples/client/petstore/java/feign-no-nullable/src/test/java/org/openapitools/client/model/BigCatAllOfTest.java deleted file mode 100644 index 2b79d23bab3..00000000000 --- a/samples/client/petstore/java/feign-no-nullable/src/test/java/org/openapitools/client/model/BigCatAllOfTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.junit.jupiter.api.Test; - - -/** - * Model tests for BigCatAllOf - */ -class BigCatAllOfTest { - private final BigCatAllOf model = new BigCatAllOf(); - - /** - * Model tests for BigCatAllOf - */ - @Test - void testBigCatAllOf() { - // TODO: test BigCatAllOf - } - - /** - * Test the property 'kind' - */ - @Test - void kindTest() { - // TODO: test kind - } - -} diff --git a/samples/client/petstore/java/feign-no-nullable/src/test/java/org/openapitools/client/model/BigCatTest.java b/samples/client/petstore/java/feign-no-nullable/src/test/java/org/openapitools/client/model/BigCatTest.java index 32af94c3981..dbad7adea66 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/test/java/org/openapitools/client/model/BigCatTest.java +++ b/samples/client/petstore/java/feign-no-nullable/src/test/java/org/openapitools/client/model/BigCatTest.java @@ -13,6 +13,7 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -20,13 +21,9 @@ import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.openapitools.client.model.BigCatAllOf; import org.openapitools.client.model.Cat; import org.junit.jupiter.api.Test; - /** * Model tests for BigCat */ diff --git a/samples/client/petstore/java/feign-no-nullable/src/test/java/org/openapitools/client/model/CatAllOfTest.java b/samples/client/petstore/java/feign-no-nullable/src/test/java/org/openapitools/client/model/CatAllOfTest.java deleted file mode 100644 index b13bcf1e7a1..00000000000 --- a/samples/client/petstore/java/feign-no-nullable/src/test/java/org/openapitools/client/model/CatAllOfTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.junit.jupiter.api.Test; - - -/** - * Model tests for CatAllOf - */ -class CatAllOfTest { - private final CatAllOf model = new CatAllOf(); - - /** - * Model tests for CatAllOf - */ - @Test - void testCatAllOf() { - // TODO: test CatAllOf - } - - /** - * Test the property 'declawed' - */ - @Test - void declawedTest() { - // TODO: test declawed - } - -} diff --git a/samples/client/petstore/java/feign-no-nullable/src/test/java/org/openapitools/client/model/DogAllOfTest.java b/samples/client/petstore/java/feign-no-nullable/src/test/java/org/openapitools/client/model/DogAllOfTest.java deleted file mode 100644 index ab8a1b63af4..00000000000 --- a/samples/client/petstore/java/feign-no-nullable/src/test/java/org/openapitools/client/model/DogAllOfTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.junit.jupiter.api.Test; - - -/** - * Model tests for DogAllOf - */ -class DogAllOfTest { - private final DogAllOf model = new DogAllOf(); - - /** - * Model tests for DogAllOf - */ - @Test - void testDogAllOf() { - // TODO: test DogAllOf - } - - /** - * Test the property 'breed' - */ - @Test - void breedTest() { - // TODO: test breed - } - -} diff --git a/samples/client/petstore/java/feign/.openapi-generator/FILES b/samples/client/petstore/java/feign/.openapi-generator/FILES index 8a08aa63045..fae67fe89c0 100644 --- a/samples/client/petstore/java/feign/.openapi-generator/FILES +++ b/samples/client/petstore/java/feign/.openapi-generator/FILES @@ -47,13 +47,11 @@ src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java src/main/java/org/openapitools/client/model/ArrayTest.java src/main/java/org/openapitools/client/model/Capitalization.java src/main/java/org/openapitools/client/model/Cat.java -src/main/java/org/openapitools/client/model/CatAllOf.java src/main/java/org/openapitools/client/model/Category.java src/main/java/org/openapitools/client/model/ClassModel.java src/main/java/org/openapitools/client/model/Client.java src/main/java/org/openapitools/client/model/DeprecatedObject.java src/main/java/org/openapitools/client/model/Dog.java -src/main/java/org/openapitools/client/model/DogAllOf.java src/main/java/org/openapitools/client/model/EnumArrays.java src/main/java/org/openapitools/client/model/EnumClass.java src/main/java/org/openapitools/client/model/EnumTest.java diff --git a/samples/client/petstore/java/feign/api/openapi.yaml b/samples/client/petstore/java/feign/api/openapi.yaml index 80e871590a3..9f0affe779f 100644 --- a/samples/client/petstore/java/feign/api/openapi.yaml +++ b/samples/client/petstore/java/feign/api/openapi.yaml @@ -1515,11 +1515,17 @@ components: Dog: allOf: - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Dog_allOf' + - properties: + breed: + type: string + type: object Cat: allOf: - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Cat_allOf' + - properties: + declawed: + type: boolean + type: object Animal: discriminator: mapping: @@ -2159,18 +2165,6 @@ components: required: - requiredFile type: object - Dog_allOf: - properties: - breed: - type: string - type: object - example: null - Cat_allOf: - properties: - declawed: - type: boolean - type: object - example: null securitySchemes: petstore_auth: flows: diff --git a/samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/model/BigCatAllOf.java b/samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/model/BigCatAllOf.java deleted file mode 100644 index e3b6b0fdd04..00000000000 --- a/samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/model/BigCatAllOf.java +++ /dev/null @@ -1,141 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -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 com.fasterxml.jackson.annotation.JsonPropertyOrder; - -/** - * BigCatAllOf - */ -@JsonPropertyOrder({ - BigCatAllOf.JSON_PROPERTY_KIND -}) -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class BigCatAllOf { - /** - * Gets or Sets kind - */ - public enum KindEnum { - LIONS("lions"), - - TIGERS("tigers"), - - LEOPARDS("leopards"), - - JAGUARS("jaguars"); - - private String value; - - KindEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static KindEnum fromValue(String value) { - for (KindEnum b : KindEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - public static final String JSON_PROPERTY_KIND = "kind"; - private KindEnum kind; - - - public BigCatAllOf kind(KindEnum kind) { - - this.kind = kind; - return this; - } - - /** - * Get kind - * @return kind - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_KIND) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public KindEnum getKind() { - return kind; - } - - - public void setKind(KindEnum kind) { - this.kind = kind; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BigCatAllOf bigCatAllOf = (BigCatAllOf) o; - return Objects.equals(this.kind, bigCatAllOf.kind); - } - - @Override - public int hashCode() { - return Objects.hash(kind); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BigCatAllOf {\n"); - sb.append(" kind: ").append(toIndentedString(kind)).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/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/model/CatAllOf.java b/samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/model/CatAllOf.java deleted file mode 100644 index 26285427f96..00000000000 --- a/samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/model/CatAllOf.java +++ /dev/null @@ -1,102 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -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 com.fasterxml.jackson.annotation.JsonPropertyOrder; - -/** - * CatAllOf - */ -@JsonPropertyOrder({ - CatAllOf.JSON_PROPERTY_DECLAWED -}) -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CatAllOf { - public static final String JSON_PROPERTY_DECLAWED = "declawed"; - private Boolean declawed; - - - public CatAllOf declawed(Boolean declawed) { - - this.declawed = declawed; - return this; - } - - /** - * Get declawed - * @return declawed - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_DECLAWED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Boolean isDeclawed() { - return declawed; - } - - - public void setDeclawed(Boolean declawed) { - this.declawed = declawed; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CatAllOf catAllOf = (CatAllOf) o; - return Objects.equals(this.declawed, catAllOf.declawed); - } - - @Override - public int hashCode() { - return Objects.hash(declawed); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CatAllOf {\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).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/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/model/DogAllOf.java b/samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/model/DogAllOf.java deleted file mode 100644 index 147bb4d9b76..00000000000 --- a/samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/model/DogAllOf.java +++ /dev/null @@ -1,102 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -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 com.fasterxml.jackson.annotation.JsonPropertyOrder; - -/** - * DogAllOf - */ -@JsonPropertyOrder({ - DogAllOf.JSON_PROPERTY_BREED -}) -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DogAllOf { - public static final String JSON_PROPERTY_BREED = "breed"; - private String breed; - - - public DogAllOf breed(String breed) { - - this.breed = breed; - return this; - } - - /** - * Get breed - * @return breed - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_BREED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getBreed() { - return breed; - } - - - public void setBreed(String breed) { - this.breed = breed; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DogAllOf dogAllOf = (DogAllOf) o; - return Objects.equals(this.breed, dogAllOf.breed); - } - - @Override - public int hashCode() { - return Objects.hash(breed); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DogAllOf {\n"); - sb.append(" breed: ").append(toIndentedString(breed)).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/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/BigCatAllOfTest.java b/samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/BigCatAllOfTest.java deleted file mode 100644 index a9b13011f00..00000000000 --- a/samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/BigCatAllOfTest.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -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 org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for BigCatAllOf - */ -public class BigCatAllOfTest { - private final BigCatAllOf model = new BigCatAllOf(); - - /** - * Model tests for BigCatAllOf - */ - @Test - public void testBigCatAllOf() { - // TODO: test BigCatAllOf - } - - /** - * Test the property 'kind' - */ - @Test - public void kindTest() { - // TODO: test kind - } - -} diff --git a/samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/BigCatTest.java b/samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/BigCatTest.java deleted file mode 100644 index 006c8070742..00000000000 --- a/samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/BigCatTest.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -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 org.openapitools.client.model.BigCatAllOf; -import org.openapitools.client.model.Cat; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for BigCat - */ -public class BigCatTest { - private final BigCat model = new BigCat(); - - /** - * Model tests for BigCat - */ - @Test - public void testBigCat() { - // TODO: test BigCat - } - - /** - * Test the property 'className' - */ - @Test - public void classNameTest() { - // TODO: test className - } - - /** - * Test the property 'color' - */ - @Test - public void colorTest() { - // TODO: test color - } - - /** - * Test the property 'declawed' - */ - @Test - public void declawedTest() { - // TODO: test declawed - } - - /** - * Test the property 'kind' - */ - @Test - public void kindTest() { - // TODO: test kind - } - -} diff --git a/samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/CatAllOfTest.java b/samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/CatAllOfTest.java deleted file mode 100644 index 69b226745d7..00000000000 --- a/samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/CatAllOfTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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. - */ - - -package org.openapitools.client.model; - -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 org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for CatAllOf - */ -public class CatAllOfTest { - private final CatAllOf model = new CatAllOf(); - - /** - * Model tests for CatAllOf - */ - @Test - public void testCatAllOf() { - // TODO: test CatAllOf - } - - /** - * Test the property 'declawed' - */ - @Test - public void declawedTest() { - // TODO: test declawed - } - -} diff --git a/samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/DogAllOfTest.java b/samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/DogAllOfTest.java deleted file mode 100644 index 1b83dcefc4f..00000000000 --- a/samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/model/DogAllOfTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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. - */ - - -package org.openapitools.client.model; - -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 org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for DogAllOf - */ -public class DogAllOfTest { - private final DogAllOf model = new DogAllOf(); - - /** - * Model tests for DogAllOf - */ - @Test - public void testDogAllOf() { - // TODO: test DogAllOf - } - - /** - * Test the property 'breed' - */ - @Test - public void breedTest() { - // TODO: test breed - } - -} diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/CatAllOf.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/CatAllOf.java deleted file mode 100644 index aeeb26b79c2..00000000000 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/CatAllOf.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** - * CatAllOf - */ -@JsonPropertyOrder({ - CatAllOf.JSON_PROPERTY_DECLAWED -}) -@JsonTypeName("Cat_allOf") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CatAllOf { - public static final String JSON_PROPERTY_DECLAWED = "declawed"; - private Boolean declawed; - - public CatAllOf() { - } - - public CatAllOf declawed(Boolean declawed) { - - this.declawed = declawed; - return this; - } - - /** - * Get declawed - * @return declawed - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DECLAWED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Boolean isDeclawed() { - return declawed; - } - - - @JsonProperty(JSON_PROPERTY_DECLAWED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDeclawed(Boolean declawed) { - this.declawed = declawed; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CatAllOf catAllOf = (CatAllOf) o; - return Objects.equals(this.declawed, catAllOf.declawed); - } - - @Override - public int hashCode() { - return Objects.hash(declawed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CatAllOf {\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/DogAllOf.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/DogAllOf.java deleted file mode 100644 index 2978c34e2cc..00000000000 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/DogAllOf.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** - * DogAllOf - */ -@JsonPropertyOrder({ - DogAllOf.JSON_PROPERTY_BREED -}) -@JsonTypeName("Dog_allOf") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DogAllOf { - public static final String JSON_PROPERTY_BREED = "breed"; - private String breed; - - public DogAllOf() { - } - - public DogAllOf breed(String breed) { - - this.breed = breed; - return this; - } - - /** - * Get breed - * @return breed - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_BREED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getBreed() { - return breed; - } - - - @JsonProperty(JSON_PROPERTY_BREED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setBreed(String breed) { - this.breed = breed; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DogAllOf dogAllOf = (DogAllOf) o; - return Objects.equals(this.breed, dogAllOf.breed); - } - - @Override - public int hashCode() { - return Objects.hash(breed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DogAllOf {\n"); - sb.append(" breed: ").append(toIndentedString(breed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/CatAllOfTest.java b/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/CatAllOfTest.java deleted file mode 100644 index 4707cd7641d..00000000000 --- a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/CatAllOfTest.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import org.junit.jupiter.api.Test; - - -/** - * Model tests for CatAllOf - */ -class CatAllOfTest { - private final CatAllOf model = new CatAllOf(); - - /** - * Model tests for CatAllOf - */ - @Test - void testCatAllOf() { - // TODO: test CatAllOf - } - - /** - * Test the property 'declawed' - */ - @Test - void declawedTest() { - // TODO: test declawed - } - -} diff --git a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/DogAllOfTest.java b/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/DogAllOfTest.java deleted file mode 100644 index d554ec15754..00000000000 --- a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/model/DogAllOfTest.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import org.junit.jupiter.api.Test; - - -/** - * Model tests for DogAllOf - */ -class DogAllOfTest { - private final DogAllOf model = new DogAllOf(); - - /** - * Model tests for DogAllOf - */ - @Test - void testDogAllOf() { - // TODO: test DogAllOf - } - - /** - * Test the property 'breed' - */ - @Test - void breedTest() { - // TODO: test breed - } - -} diff --git a/samples/client/petstore/java/google-api-client/.openapi-generator/FILES b/samples/client/petstore/java/google-api-client/.openapi-generator/FILES index 80a873b2dc9..c04117ed45d 100644 --- a/samples/client/petstore/java/google-api-client/.openapi-generator/FILES +++ b/samples/client/petstore/java/google-api-client/.openapi-generator/FILES @@ -19,15 +19,12 @@ docs/ArrayOfArrayOfNumberOnly.md docs/ArrayOfNumberOnly.md docs/ArrayTest.md docs/BigCat.md -docs/BigCatAllOf.md docs/Capitalization.md docs/Cat.md -docs/CatAllOf.md docs/Category.md docs/ClassModel.md docs/Client.md docs/Dog.md -docs/DogAllOf.md docs/EnumArrays.md docs/EnumClass.md docs/EnumTest.md @@ -92,15 +89,12 @@ src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java src/main/java/org/openapitools/client/model/ArrayTest.java src/main/java/org/openapitools/client/model/BigCat.java -src/main/java/org/openapitools/client/model/BigCatAllOf.java src/main/java/org/openapitools/client/model/Capitalization.java src/main/java/org/openapitools/client/model/Cat.java -src/main/java/org/openapitools/client/model/CatAllOf.java src/main/java/org/openapitools/client/model/Category.java src/main/java/org/openapitools/client/model/ClassModel.java src/main/java/org/openapitools/client/model/Client.java src/main/java/org/openapitools/client/model/Dog.java -src/main/java/org/openapitools/client/model/DogAllOf.java src/main/java/org/openapitools/client/model/EnumArrays.java src/main/java/org/openapitools/client/model/EnumClass.java src/main/java/org/openapitools/client/model/EnumTest.java diff --git a/samples/client/petstore/java/google-api-client/README.md b/samples/client/petstore/java/google-api-client/README.md index cca29b9b909..107b18cd631 100644 --- a/samples/client/petstore/java/google-api-client/README.md +++ b/samples/client/petstore/java/google-api-client/README.md @@ -167,15 +167,12 @@ Class | Method | HTTP request | Description - [ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md) - [ArrayTest](docs/ArrayTest.md) - [BigCat](docs/BigCat.md) - - [BigCatAllOf](docs/BigCatAllOf.md) - [Capitalization](docs/Capitalization.md) - [Cat](docs/Cat.md) - - [CatAllOf](docs/CatAllOf.md) - [Category](docs/Category.md) - [ClassModel](docs/ClassModel.md) - [Client](docs/Client.md) - [Dog](docs/Dog.md) - - [DogAllOf](docs/DogAllOf.md) - [EnumArrays](docs/EnumArrays.md) - [EnumClass](docs/EnumClass.md) - [EnumTest](docs/EnumTest.md) diff --git a/samples/client/petstore/java/google-api-client/api/openapi.yaml b/samples/client/petstore/java/google-api-client/api/openapi.yaml index e7e17402f6f..dbf370f445d 100644 --- a/samples/client/petstore/java/google-api-client/api/openapi.yaml +++ b/samples/client/petstore/java/google-api-client/api/openapi.yaml @@ -1364,15 +1364,29 @@ components: Dog: allOf: - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Dog_allOf' + - properties: + breed: + type: string + type: object Cat: allOf: - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Cat_allOf' + - properties: + declawed: + type: boolean + type: object BigCat: allOf: - $ref: '#/components/schemas/Cat' - - $ref: '#/components/schemas/BigCat_allOf' + - properties: + kind: + enum: + - lions + - tigers + - leopards + - jaguars + type: string + type: object Animal: discriminator: propertyName: className @@ -2165,29 +2179,6 @@ components: required: - requiredFile type: object - Dog_allOf: - properties: - breed: - type: string - type: object - example: null - Cat_allOf: - properties: - declawed: - type: boolean - type: object - example: null - BigCat_allOf: - properties: - kind: - enum: - - lions - - tigers - - leopards - - jaguars - type: string - type: object - example: null securitySchemes: petstore_auth: flows: diff --git a/samples/client/petstore/java/google-api-client/docs/BigCatAllOf.md b/samples/client/petstore/java/google-api-client/docs/BigCatAllOf.md deleted file mode 100644 index 2bee213a607..00000000000 --- a/samples/client/petstore/java/google-api-client/docs/BigCatAllOf.md +++ /dev/null @@ -1,24 +0,0 @@ - - -# BigCatAllOf - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**kind** | [**KindEnum**](#KindEnum) | | [optional] | - - - -## Enum: KindEnum - -| Name | Value | -|---- | -----| -| LIONS | "lions" | -| TIGERS | "tigers" | -| LEOPARDS | "leopards" | -| JAGUARS | "jaguars" | - - - diff --git a/samples/client/petstore/java/google-api-client/docs/CatAllOf.md b/samples/client/petstore/java/google-api-client/docs/CatAllOf.md deleted file mode 100644 index 926bc0abd78..00000000000 --- a/samples/client/petstore/java/google-api-client/docs/CatAllOf.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# CatAllOf - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**declawed** | **Boolean** | | [optional] | - - - diff --git a/samples/client/petstore/java/google-api-client/docs/DogAllOf.md b/samples/client/petstore/java/google-api-client/docs/DogAllOf.md deleted file mode 100644 index d4e4ea0d548..00000000000 --- a/samples/client/petstore/java/google-api-client/docs/DogAllOf.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# DogAllOf - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**breed** | **String** | | [optional] | - - - diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/BigCatAllOf.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/BigCatAllOf.java deleted file mode 100644 index e357e3111ca..00000000000 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/BigCatAllOf.java +++ /dev/null @@ -1,143 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** - * BigCatAllOf - */ -@JsonPropertyOrder({ - BigCatAllOf.JSON_PROPERTY_KIND -}) -@JsonTypeName("BigCat_allOf") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class BigCatAllOf { - /** - * Gets or Sets kind - */ - public enum KindEnum { - LIONS("lions"), - - TIGERS("tigers"), - - LEOPARDS("leopards"), - - JAGUARS("jaguars"); - - private String value; - - KindEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static KindEnum fromValue(String value) { - for (KindEnum b : KindEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - public static final String JSON_PROPERTY_KIND = "kind"; - private KindEnum kind; - - public BigCatAllOf() { - } - - public BigCatAllOf kind(KindEnum kind) { - - this.kind = kind; - return this; - } - - /** - * Get kind - * @return kind - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_KIND) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public KindEnum getKind() { - return kind; - } - - - @JsonProperty(JSON_PROPERTY_KIND) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setKind(KindEnum kind) { - this.kind = kind; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BigCatAllOf bigCatAllOf = (BigCatAllOf) o; - return Objects.equals(this.kind, bigCatAllOf.kind); - } - - @Override - public int hashCode() { - return Objects.hash(kind); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BigCatAllOf {\n"); - sb.append(" kind: ").append(toIndentedString(kind)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/CatAllOf.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/CatAllOf.java deleted file mode 100644 index 7c404d48482..00000000000 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/CatAllOf.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** - * CatAllOf - */ -@JsonPropertyOrder({ - CatAllOf.JSON_PROPERTY_DECLAWED -}) -@JsonTypeName("Cat_allOf") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CatAllOf { - public static final String JSON_PROPERTY_DECLAWED = "declawed"; - private Boolean declawed; - - public CatAllOf() { - } - - public CatAllOf declawed(Boolean declawed) { - - this.declawed = declawed; - return this; - } - - /** - * Get declawed - * @return declawed - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DECLAWED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Boolean getDeclawed() { - return declawed; - } - - - @JsonProperty(JSON_PROPERTY_DECLAWED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDeclawed(Boolean declawed) { - this.declawed = declawed; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CatAllOf catAllOf = (CatAllOf) o; - return Objects.equals(this.declawed, catAllOf.declawed); - } - - @Override - public int hashCode() { - return Objects.hash(declawed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CatAllOf {\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/DogAllOf.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/DogAllOf.java deleted file mode 100644 index 2978c34e2cc..00000000000 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/model/DogAllOf.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** - * DogAllOf - */ -@JsonPropertyOrder({ - DogAllOf.JSON_PROPERTY_BREED -}) -@JsonTypeName("Dog_allOf") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DogAllOf { - public static final String JSON_PROPERTY_BREED = "breed"; - private String breed; - - public DogAllOf() { - } - - public DogAllOf breed(String breed) { - - this.breed = breed; - return this; - } - - /** - * Get breed - * @return breed - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_BREED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getBreed() { - return breed; - } - - - @JsonProperty(JSON_PROPERTY_BREED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setBreed(String breed) { - this.breed = breed; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DogAllOf dogAllOf = (DogAllOf) o; - return Objects.equals(this.breed, dogAllOf.breed); - } - - @Override - public int hashCode() { - return Objects.hash(breed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DogAllOf {\n"); - sb.append(" breed: ").append(toIndentedString(breed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/BigCatAllOfTest.java b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/BigCatAllOfTest.java deleted file mode 100644 index 8e291df45f1..00000000000 --- a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/BigCatAllOfTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for BigCatAllOf - */ -public class BigCatAllOfTest { - private final BigCatAllOf model = new BigCatAllOf(); - - /** - * Model tests for BigCatAllOf - */ - @Test - public void testBigCatAllOf() { - // TODO: test BigCatAllOf - } - - /** - * Test the property 'kind' - */ - @Test - public void kindTest() { - // TODO: test kind - } - -} diff --git a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/BigCatTest.java b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/BigCatTest.java index f6c4621c9ea..765bd150512 100644 --- a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/BigCatTest.java +++ b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/BigCatTest.java @@ -26,7 +26,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for BigCat */ diff --git a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/CatAllOfTest.java b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/CatAllOfTest.java deleted file mode 100644 index 269bdbe11b7..00000000000 --- a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/CatAllOfTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for CatAllOf - */ -public class CatAllOfTest { - private final CatAllOf model = new CatAllOf(); - - /** - * Model tests for CatAllOf - */ - @Test - public void testCatAllOf() { - // TODO: test CatAllOf - } - - /** - * Test the property 'declawed' - */ - @Test - public void declawedTest() { - // TODO: test declawed - } - -} diff --git a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/DogAllOfTest.java b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/DogAllOfTest.java deleted file mode 100644 index dfa91c25ec8..00000000000 --- a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/model/DogAllOfTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for DogAllOf - */ -public class DogAllOfTest { - private final DogAllOf model = new DogAllOf(); - - /** - * Model tests for DogAllOf - */ - @Test - public void testDogAllOf() { - // TODO: test DogAllOf - } - - /** - * Test the property 'breed' - */ - @Test - public void breedTest() { - // TODO: test breed - } - -} diff --git a/samples/client/petstore/java/jersey1/.openapi-generator/FILES b/samples/client/petstore/java/jersey1/.openapi-generator/FILES index 18764e6e506..2536048b23c 100644 --- a/samples/client/petstore/java/jersey1/.openapi-generator/FILES +++ b/samples/client/petstore/java/jersey1/.openapi-generator/FILES @@ -19,15 +19,12 @@ docs/ArrayOfArrayOfNumberOnly.md docs/ArrayOfNumberOnly.md docs/ArrayTest.md docs/BigCat.md -docs/BigCatAllOf.md docs/Capitalization.md docs/Cat.md -docs/CatAllOf.md docs/Category.md docs/ClassModel.md docs/Client.md docs/Dog.md -docs/DogAllOf.md docs/EnumArrays.md docs/EnumClass.md docs/EnumTest.md @@ -102,15 +99,12 @@ src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java src/main/java/org/openapitools/client/model/ArrayTest.java src/main/java/org/openapitools/client/model/BigCat.java -src/main/java/org/openapitools/client/model/BigCatAllOf.java src/main/java/org/openapitools/client/model/Capitalization.java src/main/java/org/openapitools/client/model/Cat.java -src/main/java/org/openapitools/client/model/CatAllOf.java src/main/java/org/openapitools/client/model/Category.java src/main/java/org/openapitools/client/model/ClassModel.java src/main/java/org/openapitools/client/model/Client.java src/main/java/org/openapitools/client/model/Dog.java -src/main/java/org/openapitools/client/model/DogAllOf.java src/main/java/org/openapitools/client/model/EnumArrays.java src/main/java/org/openapitools/client/model/EnumClass.java src/main/java/org/openapitools/client/model/EnumTest.java diff --git a/samples/client/petstore/java/jersey1/README.md b/samples/client/petstore/java/jersey1/README.md index 30ff36bf846..e1a7fdd7633 100644 --- a/samples/client/petstore/java/jersey1/README.md +++ b/samples/client/petstore/java/jersey1/README.md @@ -167,15 +167,12 @@ Class | Method | HTTP request | Description - [ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md) - [ArrayTest](docs/ArrayTest.md) - [BigCat](docs/BigCat.md) - - [BigCatAllOf](docs/BigCatAllOf.md) - [Capitalization](docs/Capitalization.md) - [Cat](docs/Cat.md) - - [CatAllOf](docs/CatAllOf.md) - [Category](docs/Category.md) - [ClassModel](docs/ClassModel.md) - [Client](docs/Client.md) - [Dog](docs/Dog.md) - - [DogAllOf](docs/DogAllOf.md) - [EnumArrays](docs/EnumArrays.md) - [EnumClass](docs/EnumClass.md) - [EnumTest](docs/EnumTest.md) diff --git a/samples/client/petstore/java/jersey1/api/openapi.yaml b/samples/client/petstore/java/jersey1/api/openapi.yaml index e7e17402f6f..dbf370f445d 100644 --- a/samples/client/petstore/java/jersey1/api/openapi.yaml +++ b/samples/client/petstore/java/jersey1/api/openapi.yaml @@ -1364,15 +1364,29 @@ components: Dog: allOf: - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Dog_allOf' + - properties: + breed: + type: string + type: object Cat: allOf: - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Cat_allOf' + - properties: + declawed: + type: boolean + type: object BigCat: allOf: - $ref: '#/components/schemas/Cat' - - $ref: '#/components/schemas/BigCat_allOf' + - properties: + kind: + enum: + - lions + - tigers + - leopards + - jaguars + type: string + type: object Animal: discriminator: propertyName: className @@ -2165,29 +2179,6 @@ components: required: - requiredFile type: object - Dog_allOf: - properties: - breed: - type: string - type: object - example: null - Cat_allOf: - properties: - declawed: - type: boolean - type: object - example: null - BigCat_allOf: - properties: - kind: - enum: - - lions - - tigers - - leopards - - jaguars - type: string - type: object - example: null securitySchemes: petstore_auth: flows: diff --git a/samples/client/petstore/java/jersey1/docs/BigCatAllOf.md b/samples/client/petstore/java/jersey1/docs/BigCatAllOf.md deleted file mode 100644 index 2bee213a607..00000000000 --- a/samples/client/petstore/java/jersey1/docs/BigCatAllOf.md +++ /dev/null @@ -1,24 +0,0 @@ - - -# BigCatAllOf - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**kind** | [**KindEnum**](#KindEnum) | | [optional] | - - - -## Enum: KindEnum - -| Name | Value | -|---- | -----| -| LIONS | "lions" | -| TIGERS | "tigers" | -| LEOPARDS | "leopards" | -| JAGUARS | "jaguars" | - - - diff --git a/samples/client/petstore/java/jersey1/docs/CatAllOf.md b/samples/client/petstore/java/jersey1/docs/CatAllOf.md deleted file mode 100644 index 926bc0abd78..00000000000 --- a/samples/client/petstore/java/jersey1/docs/CatAllOf.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# CatAllOf - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**declawed** | **Boolean** | | [optional] | - - - diff --git a/samples/client/petstore/java/jersey1/docs/DogAllOf.md b/samples/client/petstore/java/jersey1/docs/DogAllOf.md deleted file mode 100644 index d4e4ea0d548..00000000000 --- a/samples/client/petstore/java/jersey1/docs/DogAllOf.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# DogAllOf - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**breed** | **String** | | [optional] | - - - diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/BigCatAllOf.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/BigCatAllOf.java deleted file mode 100644 index e357e3111ca..00000000000 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/BigCatAllOf.java +++ /dev/null @@ -1,143 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** - * BigCatAllOf - */ -@JsonPropertyOrder({ - BigCatAllOf.JSON_PROPERTY_KIND -}) -@JsonTypeName("BigCat_allOf") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class BigCatAllOf { - /** - * Gets or Sets kind - */ - public enum KindEnum { - LIONS("lions"), - - TIGERS("tigers"), - - LEOPARDS("leopards"), - - JAGUARS("jaguars"); - - private String value; - - KindEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static KindEnum fromValue(String value) { - for (KindEnum b : KindEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - public static final String JSON_PROPERTY_KIND = "kind"; - private KindEnum kind; - - public BigCatAllOf() { - } - - public BigCatAllOf kind(KindEnum kind) { - - this.kind = kind; - return this; - } - - /** - * Get kind - * @return kind - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_KIND) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public KindEnum getKind() { - return kind; - } - - - @JsonProperty(JSON_PROPERTY_KIND) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setKind(KindEnum kind) { - this.kind = kind; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BigCatAllOf bigCatAllOf = (BigCatAllOf) o; - return Objects.equals(this.kind, bigCatAllOf.kind); - } - - @Override - public int hashCode() { - return Objects.hash(kind); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BigCatAllOf {\n"); - sb.append(" kind: ").append(toIndentedString(kind)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/CatAllOf.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/CatAllOf.java deleted file mode 100644 index 7c404d48482..00000000000 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/CatAllOf.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** - * CatAllOf - */ -@JsonPropertyOrder({ - CatAllOf.JSON_PROPERTY_DECLAWED -}) -@JsonTypeName("Cat_allOf") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CatAllOf { - public static final String JSON_PROPERTY_DECLAWED = "declawed"; - private Boolean declawed; - - public CatAllOf() { - } - - public CatAllOf declawed(Boolean declawed) { - - this.declawed = declawed; - return this; - } - - /** - * Get declawed - * @return declawed - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DECLAWED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Boolean getDeclawed() { - return declawed; - } - - - @JsonProperty(JSON_PROPERTY_DECLAWED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDeclawed(Boolean declawed) { - this.declawed = declawed; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CatAllOf catAllOf = (CatAllOf) o; - return Objects.equals(this.declawed, catAllOf.declawed); - } - - @Override - public int hashCode() { - return Objects.hash(declawed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CatAllOf {\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/DogAllOf.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/DogAllOf.java deleted file mode 100644 index 2978c34e2cc..00000000000 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/model/DogAllOf.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** - * DogAllOf - */ -@JsonPropertyOrder({ - DogAllOf.JSON_PROPERTY_BREED -}) -@JsonTypeName("Dog_allOf") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DogAllOf { - public static final String JSON_PROPERTY_BREED = "breed"; - private String breed; - - public DogAllOf() { - } - - public DogAllOf breed(String breed) { - - this.breed = breed; - return this; - } - - /** - * Get breed - * @return breed - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_BREED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getBreed() { - return breed; - } - - - @JsonProperty(JSON_PROPERTY_BREED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setBreed(String breed) { - this.breed = breed; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DogAllOf dogAllOf = (DogAllOf) o; - return Objects.equals(this.breed, dogAllOf.breed); - } - - @Override - public int hashCode() { - return Objects.hash(breed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DogAllOf {\n"); - sb.append(" breed: ").append(toIndentedString(breed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/BigCatAllOfTest.java b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/BigCatAllOfTest.java deleted file mode 100644 index 8e291df45f1..00000000000 --- a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/BigCatAllOfTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for BigCatAllOf - */ -public class BigCatAllOfTest { - private final BigCatAllOf model = new BigCatAllOf(); - - /** - * Model tests for BigCatAllOf - */ - @Test - public void testBigCatAllOf() { - // TODO: test BigCatAllOf - } - - /** - * Test the property 'kind' - */ - @Test - public void kindTest() { - // TODO: test kind - } - -} diff --git a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/BigCatTest.java b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/BigCatTest.java index f6c4621c9ea..765bd150512 100644 --- a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/BigCatTest.java +++ b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/BigCatTest.java @@ -26,7 +26,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for BigCat */ diff --git a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/CatAllOfTest.java b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/CatAllOfTest.java deleted file mode 100644 index 269bdbe11b7..00000000000 --- a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/CatAllOfTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for CatAllOf - */ -public class CatAllOfTest { - private final CatAllOf model = new CatAllOf(); - - /** - * Model tests for CatAllOf - */ - @Test - public void testCatAllOf() { - // TODO: test CatAllOf - } - - /** - * Test the property 'declawed' - */ - @Test - public void declawedTest() { - // TODO: test declawed - } - -} diff --git a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/DogAllOfTest.java b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/DogAllOfTest.java deleted file mode 100644 index dfa91c25ec8..00000000000 --- a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/DogAllOfTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for DogAllOf - */ -public class DogAllOfTest { - private final DogAllOf model = new DogAllOf(); - - /** - * Model tests for DogAllOf - */ - @Test - public void testDogAllOf() { - // TODO: test DogAllOf - } - - /** - * Test the property 'breed' - */ - @Test - public void breedTest() { - // TODO: test breed - } - -} diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/.openapi-generator/FILES b/samples/client/petstore/java/jersey2-java8-localdatetime/.openapi-generator/FILES index c1aca24c49d..e883eed4ead 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/.openapi-generator/FILES +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/.openapi-generator/FILES @@ -19,15 +19,12 @@ docs/ArrayOfArrayOfNumberOnly.md docs/ArrayOfNumberOnly.md docs/ArrayTest.md docs/BigCat.md -docs/BigCatAllOf.md docs/Capitalization.md docs/Cat.md -docs/CatAllOf.md docs/Category.md docs/ClassModel.md docs/Client.md docs/Dog.md -docs/DogAllOf.md docs/EnumArrays.md docs/EnumClass.md docs/EnumTest.md @@ -105,15 +102,12 @@ src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java src/main/java/org/openapitools/client/model/ArrayTest.java src/main/java/org/openapitools/client/model/BigCat.java -src/main/java/org/openapitools/client/model/BigCatAllOf.java src/main/java/org/openapitools/client/model/Capitalization.java src/main/java/org/openapitools/client/model/Cat.java -src/main/java/org/openapitools/client/model/CatAllOf.java src/main/java/org/openapitools/client/model/Category.java src/main/java/org/openapitools/client/model/ClassModel.java src/main/java/org/openapitools/client/model/Client.java src/main/java/org/openapitools/client/model/Dog.java -src/main/java/org/openapitools/client/model/DogAllOf.java src/main/java/org/openapitools/client/model/EnumArrays.java src/main/java/org/openapitools/client/model/EnumClass.java src/main/java/org/openapitools/client/model/EnumTest.java diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/README.md b/samples/client/petstore/java/jersey2-java8-localdatetime/README.md index 7508df9d305..e582668b206 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/README.md +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/README.md @@ -192,15 +192,12 @@ Class | Method | HTTP request | Description - [ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md) - [ArrayTest](docs/ArrayTest.md) - [BigCat](docs/BigCat.md) - - [BigCatAllOf](docs/BigCatAllOf.md) - [Capitalization](docs/Capitalization.md) - [Cat](docs/Cat.md) - - [CatAllOf](docs/CatAllOf.md) - [Category](docs/Category.md) - [ClassModel](docs/ClassModel.md) - [Client](docs/Client.md) - [Dog](docs/Dog.md) - - [DogAllOf](docs/DogAllOf.md) - [EnumArrays](docs/EnumArrays.md) - [EnumClass](docs/EnumClass.md) - [EnumTest](docs/EnumTest.md) diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/api/openapi.yaml b/samples/client/petstore/java/jersey2-java8-localdatetime/api/openapi.yaml index e7e17402f6f..dbf370f445d 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/api/openapi.yaml +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/api/openapi.yaml @@ -1364,15 +1364,29 @@ components: Dog: allOf: - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Dog_allOf' + - properties: + breed: + type: string + type: object Cat: allOf: - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Cat_allOf' + - properties: + declawed: + type: boolean + type: object BigCat: allOf: - $ref: '#/components/schemas/Cat' - - $ref: '#/components/schemas/BigCat_allOf' + - properties: + kind: + enum: + - lions + - tigers + - leopards + - jaguars + type: string + type: object Animal: discriminator: propertyName: className @@ -2165,29 +2179,6 @@ components: required: - requiredFile type: object - Dog_allOf: - properties: - breed: - type: string - type: object - example: null - Cat_allOf: - properties: - declawed: - type: boolean - type: object - example: null - BigCat_allOf: - properties: - kind: - enum: - - lions - - tigers - - leopards - - jaguars - type: string - type: object - example: null securitySchemes: petstore_auth: flows: diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/BigCatAllOf.md b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/BigCatAllOf.md deleted file mode 100644 index 2bee213a607..00000000000 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/BigCatAllOf.md +++ /dev/null @@ -1,24 +0,0 @@ - - -# BigCatAllOf - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**kind** | [**KindEnum**](#KindEnum) | | [optional] | - - - -## Enum: KindEnum - -| Name | Value | -|---- | -----| -| LIONS | "lions" | -| TIGERS | "tigers" | -| LEOPARDS | "leopards" | -| JAGUARS | "jaguars" | - - - diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/CatAllOf.md b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/CatAllOf.md deleted file mode 100644 index 926bc0abd78..00000000000 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/CatAllOf.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# CatAllOf - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**declawed** | **Boolean** | | [optional] | - - - diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/DogAllOf.md b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/DogAllOf.md deleted file mode 100644 index d4e4ea0d548..00000000000 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/DogAllOf.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# DogAllOf - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**breed** | **String** | | [optional] | - - - diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/src/main/java/org/openapitools/client/model/BigCatAllOf.java b/samples/client/petstore/java/jersey2-java8-localdatetime/src/main/java/org/openapitools/client/model/BigCatAllOf.java deleted file mode 100644 index 9fcdcd1e19b..00000000000 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/src/main/java/org/openapitools/client/model/BigCatAllOf.java +++ /dev/null @@ -1,149 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import org.openapitools.client.JSON; - - -/** - * BigCatAllOf - */ -@JsonPropertyOrder({ - BigCatAllOf.JSON_PROPERTY_KIND -}) -@JsonTypeName("BigCat_allOf") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class BigCatAllOf { - /** - * Gets or Sets kind - */ - public enum KindEnum { - LIONS("lions"), - - TIGERS("tigers"), - - LEOPARDS("leopards"), - - JAGUARS("jaguars"); - - private String value; - - KindEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static KindEnum fromValue(String value) { - for (KindEnum b : KindEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - public static final String JSON_PROPERTY_KIND = "kind"; - private KindEnum kind; - - public BigCatAllOf() { - } - - public BigCatAllOf kind(KindEnum kind) { - this.kind = kind; - return this; - } - - /** - * Get kind - * @return kind - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_KIND) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public KindEnum getKind() { - return kind; - } - - - @JsonProperty(JSON_PROPERTY_KIND) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setKind(KindEnum kind) { - this.kind = kind; - } - - - /** - * Return true if this BigCat_allOf object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BigCatAllOf bigCatAllOf = (BigCatAllOf) o; - return Objects.equals(this.kind, bigCatAllOf.kind); - } - - @Override - public int hashCode() { - return Objects.hash(kind); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BigCatAllOf {\n"); - sb.append(" kind: ").append(toIndentedString(kind)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/src/main/java/org/openapitools/client/model/CatAllOf.java b/samples/client/petstore/java/jersey2-java8-localdatetime/src/main/java/org/openapitools/client/model/CatAllOf.java deleted file mode 100644 index b2b20d77e38..00000000000 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/src/main/java/org/openapitools/client/model/CatAllOf.java +++ /dev/null @@ -1,110 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import org.openapitools.client.JSON; - - -/** - * CatAllOf - */ -@JsonPropertyOrder({ - CatAllOf.JSON_PROPERTY_DECLAWED -}) -@JsonTypeName("Cat_allOf") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CatAllOf { - public static final String JSON_PROPERTY_DECLAWED = "declawed"; - private Boolean declawed; - - public CatAllOf() { - } - - public CatAllOf declawed(Boolean declawed) { - this.declawed = declawed; - return this; - } - - /** - * Get declawed - * @return declawed - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DECLAWED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Boolean getDeclawed() { - return declawed; - } - - - @JsonProperty(JSON_PROPERTY_DECLAWED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDeclawed(Boolean declawed) { - this.declawed = declawed; - } - - - /** - * Return true if this Cat_allOf object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CatAllOf catAllOf = (CatAllOf) o; - return Objects.equals(this.declawed, catAllOf.declawed); - } - - @Override - public int hashCode() { - return Objects.hash(declawed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CatAllOf {\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/src/main/java/org/openapitools/client/model/DogAllOf.java b/samples/client/petstore/java/jersey2-java8-localdatetime/src/main/java/org/openapitools/client/model/DogAllOf.java deleted file mode 100644 index a9b84e23719..00000000000 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/src/main/java/org/openapitools/client/model/DogAllOf.java +++ /dev/null @@ -1,110 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import org.openapitools.client.JSON; - - -/** - * DogAllOf - */ -@JsonPropertyOrder({ - DogAllOf.JSON_PROPERTY_BREED -}) -@JsonTypeName("Dog_allOf") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DogAllOf { - public static final String JSON_PROPERTY_BREED = "breed"; - private String breed; - - public DogAllOf() { - } - - public DogAllOf breed(String breed) { - this.breed = breed; - return this; - } - - /** - * Get breed - * @return breed - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_BREED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getBreed() { - return breed; - } - - - @JsonProperty(JSON_PROPERTY_BREED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setBreed(String breed) { - this.breed = breed; - } - - - /** - * Return true if this Dog_allOf object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DogAllOf dogAllOf = (DogAllOf) o; - return Objects.equals(this.breed, dogAllOf.breed); - } - - @Override - public int hashCode() { - return Objects.hash(breed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DogAllOf {\n"); - sb.append(" breed: ").append(toIndentedString(breed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/BigCatAllOfTest.java b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/BigCatAllOfTest.java deleted file mode 100644 index 79c32ab25c1..00000000000 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/BigCatAllOfTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; - -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for BigCatAllOf - */ -public class BigCatAllOfTest { - private final BigCatAllOf model = new BigCatAllOf(); - - /** - * Model tests for BigCatAllOf - */ - @Test - public void testBigCatAllOf() { - // TODO: test BigCatAllOf - } - - /** - * Test the property 'kind' - */ - @Test - public void kindTest() { - // TODO: test kind - } - -} diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/CatAllOfTest.java b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/CatAllOfTest.java deleted file mode 100644 index 7ec3638d0ef..00000000000 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/CatAllOfTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; - -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for CatAllOf - */ -public class CatAllOfTest { - private final CatAllOf model = new CatAllOf(); - - /** - * Model tests for CatAllOf - */ - @Test - public void testCatAllOf() { - // TODO: test CatAllOf - } - - /** - * Test the property 'declawed' - */ - @Test - public void declawedTest() { - // TODO: test declawed - } - -} diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/DogAllOfTest.java b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/DogAllOfTest.java deleted file mode 100644 index ffafa256753..00000000000 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/model/DogAllOfTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; - -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for DogAllOf - */ -public class DogAllOfTest { - private final DogAllOf model = new DogAllOf(); - - /** - * Model tests for DogAllOf - */ - @Test - public void testDogAllOf() { - // TODO: test DogAllOf - } - - /** - * Test the property 'breed' - */ - @Test - public void breedTest() { - // TODO: test breed - } - -} diff --git a/samples/client/petstore/java/jersey2-java8/.openapi-generator/FILES b/samples/client/petstore/java/jersey2-java8/.openapi-generator/FILES index c1aca24c49d..e883eed4ead 100644 --- a/samples/client/petstore/java/jersey2-java8/.openapi-generator/FILES +++ b/samples/client/petstore/java/jersey2-java8/.openapi-generator/FILES @@ -19,15 +19,12 @@ docs/ArrayOfArrayOfNumberOnly.md docs/ArrayOfNumberOnly.md docs/ArrayTest.md docs/BigCat.md -docs/BigCatAllOf.md docs/Capitalization.md docs/Cat.md -docs/CatAllOf.md docs/Category.md docs/ClassModel.md docs/Client.md docs/Dog.md -docs/DogAllOf.md docs/EnumArrays.md docs/EnumClass.md docs/EnumTest.md @@ -105,15 +102,12 @@ src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java src/main/java/org/openapitools/client/model/ArrayTest.java src/main/java/org/openapitools/client/model/BigCat.java -src/main/java/org/openapitools/client/model/BigCatAllOf.java src/main/java/org/openapitools/client/model/Capitalization.java src/main/java/org/openapitools/client/model/Cat.java -src/main/java/org/openapitools/client/model/CatAllOf.java src/main/java/org/openapitools/client/model/Category.java src/main/java/org/openapitools/client/model/ClassModel.java src/main/java/org/openapitools/client/model/Client.java src/main/java/org/openapitools/client/model/Dog.java -src/main/java/org/openapitools/client/model/DogAllOf.java src/main/java/org/openapitools/client/model/EnumArrays.java src/main/java/org/openapitools/client/model/EnumClass.java src/main/java/org/openapitools/client/model/EnumTest.java diff --git a/samples/client/petstore/java/jersey2-java8/README.md b/samples/client/petstore/java/jersey2-java8/README.md index b6259c6538a..5b342eff3fe 100644 --- a/samples/client/petstore/java/jersey2-java8/README.md +++ b/samples/client/petstore/java/jersey2-java8/README.md @@ -192,15 +192,12 @@ Class | Method | HTTP request | Description - [ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md) - [ArrayTest](docs/ArrayTest.md) - [BigCat](docs/BigCat.md) - - [BigCatAllOf](docs/BigCatAllOf.md) - [Capitalization](docs/Capitalization.md) - [Cat](docs/Cat.md) - - [CatAllOf](docs/CatAllOf.md) - [Category](docs/Category.md) - [ClassModel](docs/ClassModel.md) - [Client](docs/Client.md) - [Dog](docs/Dog.md) - - [DogAllOf](docs/DogAllOf.md) - [EnumArrays](docs/EnumArrays.md) - [EnumClass](docs/EnumClass.md) - [EnumTest](docs/EnumTest.md) diff --git a/samples/client/petstore/java/jersey2-java8/api/openapi.yaml b/samples/client/petstore/java/jersey2-java8/api/openapi.yaml index e7e17402f6f..dbf370f445d 100644 --- a/samples/client/petstore/java/jersey2-java8/api/openapi.yaml +++ b/samples/client/petstore/java/jersey2-java8/api/openapi.yaml @@ -1364,15 +1364,29 @@ components: Dog: allOf: - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Dog_allOf' + - properties: + breed: + type: string + type: object Cat: allOf: - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Cat_allOf' + - properties: + declawed: + type: boolean + type: object BigCat: allOf: - $ref: '#/components/schemas/Cat' - - $ref: '#/components/schemas/BigCat_allOf' + - properties: + kind: + enum: + - lions + - tigers + - leopards + - jaguars + type: string + type: object Animal: discriminator: propertyName: className @@ -2165,29 +2179,6 @@ components: required: - requiredFile type: object - Dog_allOf: - properties: - breed: - type: string - type: object - example: null - Cat_allOf: - properties: - declawed: - type: boolean - type: object - example: null - BigCat_allOf: - properties: - kind: - enum: - - lions - - tigers - - leopards - - jaguars - type: string - type: object - example: null securitySchemes: petstore_auth: flows: diff --git a/samples/client/petstore/java/jersey2-java8/docs/BigCatAllOf.md b/samples/client/petstore/java/jersey2-java8/docs/BigCatAllOf.md deleted file mode 100644 index 2bee213a607..00000000000 --- a/samples/client/petstore/java/jersey2-java8/docs/BigCatAllOf.md +++ /dev/null @@ -1,24 +0,0 @@ - - -# BigCatAllOf - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**kind** | [**KindEnum**](#KindEnum) | | [optional] | - - - -## Enum: KindEnum - -| Name | Value | -|---- | -----| -| LIONS | "lions" | -| TIGERS | "tigers" | -| LEOPARDS | "leopards" | -| JAGUARS | "jaguars" | - - - diff --git a/samples/client/petstore/java/jersey2-java8/docs/CatAllOf.md b/samples/client/petstore/java/jersey2-java8/docs/CatAllOf.md deleted file mode 100644 index 926bc0abd78..00000000000 --- a/samples/client/petstore/java/jersey2-java8/docs/CatAllOf.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# CatAllOf - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**declawed** | **Boolean** | | [optional] | - - - diff --git a/samples/client/petstore/java/jersey2-java8/docs/DogAllOf.md b/samples/client/petstore/java/jersey2-java8/docs/DogAllOf.md deleted file mode 100644 index d4e4ea0d548..00000000000 --- a/samples/client/petstore/java/jersey2-java8/docs/DogAllOf.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# DogAllOf - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**breed** | **String** | | [optional] | - - - diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/BigCatAllOf.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/BigCatAllOf.java deleted file mode 100644 index 9fcdcd1e19b..00000000000 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/BigCatAllOf.java +++ /dev/null @@ -1,149 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import org.openapitools.client.JSON; - - -/** - * BigCatAllOf - */ -@JsonPropertyOrder({ - BigCatAllOf.JSON_PROPERTY_KIND -}) -@JsonTypeName("BigCat_allOf") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class BigCatAllOf { - /** - * Gets or Sets kind - */ - public enum KindEnum { - LIONS("lions"), - - TIGERS("tigers"), - - LEOPARDS("leopards"), - - JAGUARS("jaguars"); - - private String value; - - KindEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static KindEnum fromValue(String value) { - for (KindEnum b : KindEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - public static final String JSON_PROPERTY_KIND = "kind"; - private KindEnum kind; - - public BigCatAllOf() { - } - - public BigCatAllOf kind(KindEnum kind) { - this.kind = kind; - return this; - } - - /** - * Get kind - * @return kind - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_KIND) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public KindEnum getKind() { - return kind; - } - - - @JsonProperty(JSON_PROPERTY_KIND) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setKind(KindEnum kind) { - this.kind = kind; - } - - - /** - * Return true if this BigCat_allOf object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BigCatAllOf bigCatAllOf = (BigCatAllOf) o; - return Objects.equals(this.kind, bigCatAllOf.kind); - } - - @Override - public int hashCode() { - return Objects.hash(kind); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BigCatAllOf {\n"); - sb.append(" kind: ").append(toIndentedString(kind)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/CatAllOf.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/CatAllOf.java deleted file mode 100644 index b2b20d77e38..00000000000 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/CatAllOf.java +++ /dev/null @@ -1,110 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import org.openapitools.client.JSON; - - -/** - * CatAllOf - */ -@JsonPropertyOrder({ - CatAllOf.JSON_PROPERTY_DECLAWED -}) -@JsonTypeName("Cat_allOf") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CatAllOf { - public static final String JSON_PROPERTY_DECLAWED = "declawed"; - private Boolean declawed; - - public CatAllOf() { - } - - public CatAllOf declawed(Boolean declawed) { - this.declawed = declawed; - return this; - } - - /** - * Get declawed - * @return declawed - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DECLAWED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Boolean getDeclawed() { - return declawed; - } - - - @JsonProperty(JSON_PROPERTY_DECLAWED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDeclawed(Boolean declawed) { - this.declawed = declawed; - } - - - /** - * Return true if this Cat_allOf object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CatAllOf catAllOf = (CatAllOf) o; - return Objects.equals(this.declawed, catAllOf.declawed); - } - - @Override - public int hashCode() { - return Objects.hash(declawed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CatAllOf {\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/DogAllOf.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/DogAllOf.java deleted file mode 100644 index a9b84e23719..00000000000 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/DogAllOf.java +++ /dev/null @@ -1,110 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import org.openapitools.client.JSON; - - -/** - * DogAllOf - */ -@JsonPropertyOrder({ - DogAllOf.JSON_PROPERTY_BREED -}) -@JsonTypeName("Dog_allOf") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DogAllOf { - public static final String JSON_PROPERTY_BREED = "breed"; - private String breed; - - public DogAllOf() { - } - - public DogAllOf breed(String breed) { - this.breed = breed; - return this; - } - - /** - * Get breed - * @return breed - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_BREED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getBreed() { - return breed; - } - - - @JsonProperty(JSON_PROPERTY_BREED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setBreed(String breed) { - this.breed = breed; - } - - - /** - * Return true if this Dog_allOf object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DogAllOf dogAllOf = (DogAllOf) o; - return Objects.equals(this.breed, dogAllOf.breed); - } - - @Override - public int hashCode() { - return Objects.hash(breed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DogAllOf {\n"); - sb.append(" breed: ").append(toIndentedString(breed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/BigCatAllOfTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/BigCatAllOfTest.java deleted file mode 100644 index 79c32ab25c1..00000000000 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/BigCatAllOfTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; - -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for BigCatAllOf - */ -public class BigCatAllOfTest { - private final BigCatAllOf model = new BigCatAllOf(); - - /** - * Model tests for BigCatAllOf - */ - @Test - public void testBigCatAllOf() { - // TODO: test BigCatAllOf - } - - /** - * Test the property 'kind' - */ - @Test - public void kindTest() { - // TODO: test kind - } - -} diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/CatAllOfTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/CatAllOfTest.java deleted file mode 100644 index 7ec3638d0ef..00000000000 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/CatAllOfTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; - -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for CatAllOf - */ -public class CatAllOfTest { - private final CatAllOf model = new CatAllOf(); - - /** - * Model tests for CatAllOf - */ - @Test - public void testCatAllOf() { - // TODO: test CatAllOf - } - - /** - * Test the property 'declawed' - */ - @Test - public void declawedTest() { - // TODO: test declawed - } - -} diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/DogAllOfTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/DogAllOfTest.java deleted file mode 100644 index ffafa256753..00000000000 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/DogAllOfTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; - -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for DogAllOf - */ -public class DogAllOfTest { - private final DogAllOf model = new DogAllOf(); - - /** - * Model tests for DogAllOf - */ - @Test - public void testDogAllOf() { - // TODO: test DogAllOf - } - - /** - * Test the property 'breed' - */ - @Test - public void breedTest() { - // TODO: test breed - } - -} diff --git a/samples/client/petstore/java/jersey3/.openapi-generator/FILES b/samples/client/petstore/java/jersey3/.openapi-generator/FILES index 9f9129b99e5..d3d27bc86c3 100644 --- a/samples/client/petstore/java/jersey3/.openapi-generator/FILES +++ b/samples/client/petstore/java/jersey3/.openapi-generator/FILES @@ -18,10 +18,8 @@ docs/BananaReq.md docs/BasquePig.md docs/Capitalization.md docs/Cat.md -docs/CatAllOf.md docs/Category.md docs/ChildCat.md -docs/ChildCatAllOf.md docs/ClassModel.md docs/Client.md docs/ComplexQuadrilateral.md @@ -29,7 +27,6 @@ docs/DanishPig.md docs/DefaultApi.md docs/DeprecatedObject.md docs/Dog.md -docs/DogAllOf.md docs/Drawing.md docs/EnumArrays.md docs/EnumClass.md @@ -135,17 +132,14 @@ src/main/java/org/openapitools/client/model/BananaReq.java src/main/java/org/openapitools/client/model/BasquePig.java src/main/java/org/openapitools/client/model/Capitalization.java src/main/java/org/openapitools/client/model/Cat.java -src/main/java/org/openapitools/client/model/CatAllOf.java src/main/java/org/openapitools/client/model/Category.java src/main/java/org/openapitools/client/model/ChildCat.java -src/main/java/org/openapitools/client/model/ChildCatAllOf.java src/main/java/org/openapitools/client/model/ClassModel.java src/main/java/org/openapitools/client/model/Client.java src/main/java/org/openapitools/client/model/ComplexQuadrilateral.java src/main/java/org/openapitools/client/model/DanishPig.java src/main/java/org/openapitools/client/model/DeprecatedObject.java src/main/java/org/openapitools/client/model/Dog.java -src/main/java/org/openapitools/client/model/DogAllOf.java src/main/java/org/openapitools/client/model/Drawing.java src/main/java/org/openapitools/client/model/EnumArrays.java src/main/java/org/openapitools/client/model/EnumClass.java diff --git a/samples/client/petstore/java/jersey3/README.md b/samples/client/petstore/java/jersey3/README.md index 139c8a1514a..06d6093a230 100644 --- a/samples/client/petstore/java/jersey3/README.md +++ b/samples/client/petstore/java/jersey3/README.md @@ -168,17 +168,14 @@ Class | Method | HTTP request | Description - [BasquePig](docs/BasquePig.md) - [Capitalization](docs/Capitalization.md) - [Cat](docs/Cat.md) - - [CatAllOf](docs/CatAllOf.md) - [Category](docs/Category.md) - [ChildCat](docs/ChildCat.md) - - [ChildCatAllOf](docs/ChildCatAllOf.md) - [ClassModel](docs/ClassModel.md) - [Client](docs/Client.md) - [ComplexQuadrilateral](docs/ComplexQuadrilateral.md) - [DanishPig](docs/DanishPig.md) - [DeprecatedObject](docs/DeprecatedObject.md) - [Dog](docs/Dog.md) - - [DogAllOf](docs/DogAllOf.md) - [Drawing](docs/Drawing.md) - [EnumArrays](docs/EnumArrays.md) - [EnumClass](docs/EnumClass.md) diff --git a/samples/client/petstore/java/jersey3/api/openapi.yaml b/samples/client/petstore/java/jersey3/api/openapi.yaml index b02c0b26cb7..82435d1c056 100644 --- a/samples/client/petstore/java/jersey3/api/openapi.yaml +++ b/samples/client/petstore/java/jersey3/api/openapi.yaml @@ -1416,12 +1416,18 @@ components: Dog: allOf: - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Dog_allOf' + - properties: + breed: + type: string + type: object Cat: allOf: - $ref: '#/components/schemas/Animal' - $ref: '#/components/schemas/Address' - - $ref: '#/components/schemas/Cat_allOf' + - properties: + declawed: + type: boolean + type: object Address: additionalProperties: type: integer @@ -2105,7 +2111,16 @@ components: ChildCat: allOf: - $ref: '#/components/schemas/ParentPet' - - $ref: '#/components/schemas/ChildCat_allOf' + - properties: + name: + type: string + pet_type: + default: ChildCat + enum: + - ChildCat + type: string + x-enum-as-string: true + type: object ArrayOfEnums: items: $ref: '#/components/schemas/OuterEnum' @@ -2281,30 +2296,6 @@ components: required: - requiredFile type: object - Dog_allOf: - properties: - breed: - type: string - type: object - example: null - Cat_allOf: - properties: - declawed: - type: boolean - type: object - example: null - ChildCat_allOf: - properties: - name: - type: string - pet_type: - default: ChildCat - enum: - - ChildCat - type: string - x-enum-as-string: true - type: object - example: null securitySchemes: petstore_auth: flows: diff --git a/samples/client/petstore/java/jersey3/docs/CatAllOf.md b/samples/client/petstore/java/jersey3/docs/CatAllOf.md deleted file mode 100644 index 926bc0abd78..00000000000 --- a/samples/client/petstore/java/jersey3/docs/CatAllOf.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# CatAllOf - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**declawed** | **Boolean** | | [optional] | - - - diff --git a/samples/client/petstore/java/jersey3/docs/ChildCatAllOf.md b/samples/client/petstore/java/jersey3/docs/ChildCatAllOf.md deleted file mode 100644 index 35fac5c5f09..00000000000 --- a/samples/client/petstore/java/jersey3/docs/ChildCatAllOf.md +++ /dev/null @@ -1,22 +0,0 @@ - - -# ChildCatAllOf - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**name** | **String** | | [optional] | -|**petType** | [**String**](#String) | | [optional] | - - - -## Enum: String - -| Name | Value | -|---- | -----| -| CHILDCAT | "ChildCat" | - - - diff --git a/samples/client/petstore/java/jersey3/docs/DogAllOf.md b/samples/client/petstore/java/jersey3/docs/DogAllOf.md deleted file mode 100644 index d4e4ea0d548..00000000000 --- a/samples/client/petstore/java/jersey3/docs/DogAllOf.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# DogAllOf - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**breed** | **String** | | [optional] | - - - diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/CatAllOf.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/CatAllOf.java deleted file mode 100644 index 782d263b8ce..00000000000 --- a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/CatAllOf.java +++ /dev/null @@ -1,110 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import org.openapitools.client.JSON; - - -/** - * CatAllOf - */ -@JsonPropertyOrder({ - CatAllOf.JSON_PROPERTY_DECLAWED -}) -@JsonTypeName("Cat_allOf") -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CatAllOf { - public static final String JSON_PROPERTY_DECLAWED = "declawed"; - private Boolean declawed; - - public CatAllOf() { - } - - public CatAllOf declawed(Boolean declawed) { - this.declawed = declawed; - return this; - } - - /** - * Get declawed - * @return declawed - **/ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DECLAWED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Boolean getDeclawed() { - return declawed; - } - - - @JsonProperty(JSON_PROPERTY_DECLAWED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDeclawed(Boolean declawed) { - this.declawed = declawed; - } - - - /** - * Return true if this Cat_allOf object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CatAllOf catAllOf = (CatAllOf) o; - return Objects.equals(this.declawed, catAllOf.declawed); - } - - @Override - public int hashCode() { - return Objects.hash(declawed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CatAllOf {\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ChildCatAllOf.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ChildCatAllOf.java deleted file mode 100644 index e4968d3b774..00000000000 --- a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/ChildCatAllOf.java +++ /dev/null @@ -1,155 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.Set; -import java.util.HashSet; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import org.openapitools.client.JSON; - - -/** - * ChildCatAllOf - */ -@JsonPropertyOrder({ - ChildCatAllOf.JSON_PROPERTY_NAME, - ChildCatAllOf.JSON_PROPERTY_PET_TYPE -}) -@JsonTypeName("ChildCat_allOf") -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ChildCatAllOf { - public static final String JSON_PROPERTY_NAME = "name"; - private String name; - - public static final String JSON_PROPERTY_PET_TYPE = "pet_type"; - private String petType = "ChildCat"; - - public ChildCatAllOf() { - } - - public ChildCatAllOf name(String name) { - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getName() { - return name; - } - - - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { - this.name = name; - } - - - public static final Set PET_TYPE_VALUES = new HashSet<>(Arrays.asList( - "ChildCat" - )); - - public ChildCatAllOf petType(String petType) { - if (!PET_TYPE_VALUES.contains(petType)) { - throw new IllegalArgumentException(petType + " is invalid. Possible values for petType: " + String.join(", ", PET_TYPE_VALUES)); - } - - this.petType = petType; - return this; - } - - /** - * Get petType - * @return petType - **/ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PET_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getPetType() { - return petType; - } - - - @JsonProperty(JSON_PROPERTY_PET_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPetType(String petType) { - if (!PET_TYPE_VALUES.contains(petType)) { - throw new IllegalArgumentException(petType + " is invalid. Possible values for petType: " + String.join(", ", PET_TYPE_VALUES)); - } - - this.petType = petType; - } - - - /** - * Return true if this ChildCat_allOf object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ChildCatAllOf childCatAllOf = (ChildCatAllOf) o; - return Objects.equals(this.name, childCatAllOf.name) && - Objects.equals(this.petType, childCatAllOf.petType); - } - - @Override - public int hashCode() { - return Objects.hash(name, petType); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ChildCatAllOf {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" petType: ").append(toIndentedString(petType)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/DogAllOf.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/DogAllOf.java deleted file mode 100644 index 45388ec6072..00000000000 --- a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/DogAllOf.java +++ /dev/null @@ -1,110 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import org.openapitools.client.JSON; - - -/** - * DogAllOf - */ -@JsonPropertyOrder({ - DogAllOf.JSON_PROPERTY_BREED -}) -@JsonTypeName("Dog_allOf") -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DogAllOf { - public static final String JSON_PROPERTY_BREED = "breed"; - private String breed; - - public DogAllOf() { - } - - public DogAllOf breed(String breed) { - this.breed = breed; - return this; - } - - /** - * Get breed - * @return breed - **/ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_BREED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getBreed() { - return breed; - } - - - @JsonProperty(JSON_PROPERTY_BREED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setBreed(String breed) { - this.breed = breed; - } - - - /** - * Return true if this Dog_allOf object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DogAllOf dogAllOf = (DogAllOf) o; - return Objects.equals(this.breed, dogAllOf.breed); - } - - @Override - public int hashCode() { - return Objects.hash(breed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DogAllOf {\n"); - sb.append(" breed: ").append(toIndentedString(breed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/CatAllOfTest.java b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/CatAllOfTest.java deleted file mode 100644 index 7ec3638d0ef..00000000000 --- a/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/CatAllOfTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; - -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for CatAllOf - */ -public class CatAllOfTest { - private final CatAllOf model = new CatAllOf(); - - /** - * Model tests for CatAllOf - */ - @Test - public void testCatAllOf() { - // TODO: test CatAllOf - } - - /** - * Test the property 'declawed' - */ - @Test - public void declawedTest() { - // TODO: test declawed - } - -} diff --git a/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/ChildCatAllOfTest.java b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/ChildCatAllOfTest.java deleted file mode 100644 index 3a12da4d2db..00000000000 --- a/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/ChildCatAllOfTest.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.Set; -import java.util.HashSet; - -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for ChildCatAllOf - */ -public class ChildCatAllOfTest { - private final ChildCatAllOf model = new ChildCatAllOf(); - - /** - * Model tests for ChildCatAllOf - */ - @Test - public void testChildCatAllOf() { - // TODO: test ChildCatAllOf - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - - /** - * Test the property 'petType' - */ - @Test - public void petTypeTest() { - // TODO: test petType - } - -} diff --git a/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/DogAllOfTest.java b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/DogAllOfTest.java deleted file mode 100644 index ffafa256753..00000000000 --- a/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/model/DogAllOfTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; - -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for DogAllOf - */ -public class DogAllOfTest { - private final DogAllOf model = new DogAllOf(); - - /** - * Model tests for DogAllOf - */ - @Test - public void testDogAllOf() { - // TODO: test DogAllOf - } - - /** - * Test the property 'breed' - */ - @Test - public void breedTest() { - // TODO: test breed - } - -} diff --git a/samples/client/petstore/java/native-async/.openapi-generator/FILES b/samples/client/petstore/java/native-async/.openapi-generator/FILES index 4d1e9c20b36..e9f85bd9da8 100644 --- a/samples/client/petstore/java/native-async/.openapi-generator/FILES +++ b/samples/client/petstore/java/native-async/.openapi-generator/FILES @@ -18,10 +18,8 @@ docs/BananaReq.md docs/BasquePig.md docs/Capitalization.md docs/Cat.md -docs/CatAllOf.md docs/Category.md docs/ChildCat.md -docs/ChildCatAllOf.md docs/ClassModel.md docs/Client.md docs/ComplexQuadrilateral.md @@ -29,7 +27,6 @@ docs/DanishPig.md docs/DefaultApi.md docs/DeprecatedObject.md docs/Dog.md -docs/DogAllOf.md docs/Drawing.md docs/EnumArrays.md docs/EnumClass.md @@ -127,17 +124,14 @@ src/main/java/org/openapitools/client/model/BananaReq.java src/main/java/org/openapitools/client/model/BasquePig.java src/main/java/org/openapitools/client/model/Capitalization.java src/main/java/org/openapitools/client/model/Cat.java -src/main/java/org/openapitools/client/model/CatAllOf.java src/main/java/org/openapitools/client/model/Category.java src/main/java/org/openapitools/client/model/ChildCat.java -src/main/java/org/openapitools/client/model/ChildCatAllOf.java src/main/java/org/openapitools/client/model/ClassModel.java src/main/java/org/openapitools/client/model/Client.java src/main/java/org/openapitools/client/model/ComplexQuadrilateral.java src/main/java/org/openapitools/client/model/DanishPig.java src/main/java/org/openapitools/client/model/DeprecatedObject.java src/main/java/org/openapitools/client/model/Dog.java -src/main/java/org/openapitools/client/model/DogAllOf.java src/main/java/org/openapitools/client/model/Drawing.java src/main/java/org/openapitools/client/model/EnumArrays.java src/main/java/org/openapitools/client/model/EnumClass.java diff --git a/samples/client/petstore/java/native-async/README.md b/samples/client/petstore/java/native-async/README.md index 3b7ba97a54b..9a850bd9ff1 100644 --- a/samples/client/petstore/java/native-async/README.md +++ b/samples/client/petstore/java/native-async/README.md @@ -202,17 +202,14 @@ Class | Method | HTTP request | Description - [BasquePig](docs/BasquePig.md) - [Capitalization](docs/Capitalization.md) - [Cat](docs/Cat.md) - - [CatAllOf](docs/CatAllOf.md) - [Category](docs/Category.md) - [ChildCat](docs/ChildCat.md) - - [ChildCatAllOf](docs/ChildCatAllOf.md) - [ClassModel](docs/ClassModel.md) - [Client](docs/Client.md) - [ComplexQuadrilateral](docs/ComplexQuadrilateral.md) - [DanishPig](docs/DanishPig.md) - [DeprecatedObject](docs/DeprecatedObject.md) - [Dog](docs/Dog.md) - - [DogAllOf](docs/DogAllOf.md) - [Drawing](docs/Drawing.md) - [EnumArrays](docs/EnumArrays.md) - [EnumClass](docs/EnumClass.md) diff --git a/samples/client/petstore/java/native-async/api/openapi.yaml b/samples/client/petstore/java/native-async/api/openapi.yaml index 6b583fd4056..a46f3a68fd8 100644 --- a/samples/client/petstore/java/native-async/api/openapi.yaml +++ b/samples/client/petstore/java/native-async/api/openapi.yaml @@ -1431,12 +1431,18 @@ components: Dog: allOf: - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Dog_allOf' + - properties: + breed: + type: string + type: object Cat: allOf: - $ref: '#/components/schemas/Animal' - $ref: '#/components/schemas/Address' - - $ref: '#/components/schemas/Cat_allOf' + - properties: + declawed: + type: boolean + type: object Address: additionalProperties: type: integer @@ -2118,7 +2124,16 @@ components: ChildCat: allOf: - $ref: '#/components/schemas/ParentPet' - - $ref: '#/components/schemas/ChildCat_allOf' + - properties: + name: + type: string + pet_type: + default: ChildCat + enum: + - ChildCat + type: string + x-enum-as-string: true + type: object ArrayOfEnums: items: $ref: '#/components/schemas/OuterEnum' @@ -2307,30 +2322,6 @@ components: required: - requiredFile type: object - Dog_allOf: - properties: - breed: - type: string - type: object - example: null - Cat_allOf: - properties: - declawed: - type: boolean - type: object - example: null - ChildCat_allOf: - properties: - name: - type: string - pet_type: - default: ChildCat - enum: - - ChildCat - type: string - x-enum-as-string: true - type: object - example: null securitySchemes: petstore_auth: flows: diff --git a/samples/client/petstore/java/native-async/docs/BigCatAllOf.md b/samples/client/petstore/java/native-async/docs/BigCatAllOf.md deleted file mode 100644 index 2bee213a607..00000000000 --- a/samples/client/petstore/java/native-async/docs/BigCatAllOf.md +++ /dev/null @@ -1,24 +0,0 @@ - - -# BigCatAllOf - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**kind** | [**KindEnum**](#KindEnum) | | [optional] | - - - -## Enum: KindEnum - -| Name | Value | -|---- | -----| -| LIONS | "lions" | -| TIGERS | "tigers" | -| LEOPARDS | "leopards" | -| JAGUARS | "jaguars" | - - - diff --git a/samples/client/petstore/java/native-async/docs/CatAllOf.md b/samples/client/petstore/java/native-async/docs/CatAllOf.md deleted file mode 100644 index 926bc0abd78..00000000000 --- a/samples/client/petstore/java/native-async/docs/CatAllOf.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# CatAllOf - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**declawed** | **Boolean** | | [optional] | - - - diff --git a/samples/client/petstore/java/native-async/docs/ChildCatAllOf.md b/samples/client/petstore/java/native-async/docs/ChildCatAllOf.md deleted file mode 100644 index 35fac5c5f09..00000000000 --- a/samples/client/petstore/java/native-async/docs/ChildCatAllOf.md +++ /dev/null @@ -1,22 +0,0 @@ - - -# ChildCatAllOf - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**name** | **String** | | [optional] | -|**petType** | [**String**](#String) | | [optional] | - - - -## Enum: String - -| Name | Value | -|---- | -----| -| CHILDCAT | "ChildCat" | - - - diff --git a/samples/client/petstore/java/native-async/docs/DogAllOf.md b/samples/client/petstore/java/native-async/docs/DogAllOf.md deleted file mode 100644 index d4e4ea0d548..00000000000 --- a/samples/client/petstore/java/native-async/docs/DogAllOf.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# DogAllOf - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**breed** | **String** | | [optional] | - - - diff --git a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/BigCatAllOf.java b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/BigCatAllOf.java deleted file mode 100644 index 7b3f8bb4d9d..00000000000 --- a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/BigCatAllOf.java +++ /dev/null @@ -1,147 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - - -/** - * BigCatAllOf - */ -@JsonPropertyOrder({ - BigCatAllOf.JSON_PROPERTY_KIND -}) -@javax.annotation.processing.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class BigCatAllOf { - /** - * Gets or Sets kind - */ - public enum KindEnum { - LIONS("lions"), - - TIGERS("tigers"), - - LEOPARDS("leopards"), - - JAGUARS("jaguars"); - - private String value; - - KindEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static KindEnum fromValue(String value) { - for (KindEnum b : KindEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - public static final String JSON_PROPERTY_KIND = "kind"; - private KindEnum kind; - - public BigCatAllOf() { - } - - public BigCatAllOf kind(KindEnum kind) { - this.kind = kind; - return this; - } - - /** - * Get kind - * @return kind - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_KIND) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public KindEnum getKind() { - return kind; - } - - - @JsonProperty(JSON_PROPERTY_KIND) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setKind(KindEnum kind) { - this.kind = kind; - } - - - /** - * Return true if this BigCat_allOf object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BigCatAllOf bigCatAllOf = (BigCatAllOf) o; - return Objects.equals(this.kind, bigCatAllOf.kind); - } - - @Override - public int hashCode() { - return Objects.hash(kind); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BigCatAllOf {\n"); - sb.append(" kind: ").append(toIndentedString(kind)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/CatAllOf.java b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/CatAllOf.java deleted file mode 100644 index 488de1e892e..00000000000 --- a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/CatAllOf.java +++ /dev/null @@ -1,150 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import java.net.URLEncoder; -import java.nio.charset.StandardCharsets; -import java.util.StringJoiner; -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - - -/** - * CatAllOf - */ -@JsonPropertyOrder({ - CatAllOf.JSON_PROPERTY_DECLAWED -}) -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CatAllOf { - public static final String JSON_PROPERTY_DECLAWED = "declawed"; - private Boolean declawed; - - public CatAllOf() { - } - - public CatAllOf declawed(Boolean declawed) { - this.declawed = declawed; - return this; - } - - /** - * Get declawed - * @return declawed - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DECLAWED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Boolean getDeclawed() { - return declawed; - } - - - @JsonProperty(JSON_PROPERTY_DECLAWED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDeclawed(Boolean declawed) { - this.declawed = declawed; - } - - - /** - * Return true if this Cat_allOf object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CatAllOf catAllOf = (CatAllOf) o; - return Objects.equals(this.declawed, catAllOf.declawed); - } - - @Override - public int hashCode() { - return Objects.hash(declawed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CatAllOf {\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - /** - * Convert the instance into URL query string. - * - * @return URL query string - */ - public String toUrlQueryString() { - return toUrlQueryString(null); - } - - /** - * Convert the instance into URL query string. - * - * @param prefix prefix of the query string - * @return URL query string - */ - public String toUrlQueryString(String prefix) { - String suffix = ""; - String containerSuffix = ""; - String containerPrefix = ""; - if (prefix == null) { - // style=form, explode=true, e.g. /pet?name=cat&type=manx - prefix = ""; - } else { - // deepObject style e.g. /pet?id[name]=cat&id[type]=manx - prefix = prefix + "["; - suffix = "]"; - containerSuffix = "]"; - containerPrefix = "["; - } - - StringJoiner joiner = new StringJoiner("&"); - - // add `declawed` to the URL query string - if (getDeclawed() != null) { - joiner.add(String.format("%sdeclawed%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDeclawed()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); - } - - return joiner.toString(); - } -} - diff --git a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/ChildCatAllOf.java b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/ChildCatAllOf.java deleted file mode 100644 index dd086c58f56..00000000000 --- a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/ChildCatAllOf.java +++ /dev/null @@ -1,200 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import java.net.URLEncoder; -import java.nio.charset.StandardCharsets; -import java.util.StringJoiner; -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.Set; -import java.util.HashSet; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - - -/** - * ChildCatAllOf - */ -@JsonPropertyOrder({ - ChildCatAllOf.JSON_PROPERTY_NAME, - ChildCatAllOf.JSON_PROPERTY_PET_TYPE -}) -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ChildCatAllOf { - public static final String JSON_PROPERTY_NAME = "name"; - private String name; - - public static final String JSON_PROPERTY_PET_TYPE = "pet_type"; - private String petType = "ChildCat"; - - public ChildCatAllOf() { - } - - public ChildCatAllOf name(String name) { - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getName() { - return name; - } - - - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { - this.name = name; - } - - - public static final Set PET_TYPE_VALUES = new HashSet<>(Arrays.asList( - "ChildCat" - )); - - public ChildCatAllOf petType(String petType) { - if (!PET_TYPE_VALUES.contains(petType)) { - throw new IllegalArgumentException(petType + " is invalid. Possible values for petType: " + String.join(", ", PET_TYPE_VALUES)); - } - - this.petType = petType; - return this; - } - - /** - * Get petType - * @return petType - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PET_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getPetType() { - return petType; - } - - - @JsonProperty(JSON_PROPERTY_PET_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPetType(String petType) { - if (!PET_TYPE_VALUES.contains(petType)) { - throw new IllegalArgumentException(petType + " is invalid. Possible values for petType: " + String.join(", ", PET_TYPE_VALUES)); - } - - this.petType = petType; - } - - - /** - * Return true if this ChildCat_allOf object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ChildCatAllOf childCatAllOf = (ChildCatAllOf) o; - return Objects.equals(this.name, childCatAllOf.name) && - Objects.equals(this.petType, childCatAllOf.petType); - } - - @Override - public int hashCode() { - return Objects.hash(name, petType); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ChildCatAllOf {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" petType: ").append(toIndentedString(petType)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - /** - * Convert the instance into URL query string. - * - * @return URL query string - */ - public String toUrlQueryString() { - return toUrlQueryString(null); - } - - /** - * Convert the instance into URL query string. - * - * @param prefix prefix of the query string - * @return URL query string - */ - public String toUrlQueryString(String prefix) { - String suffix = ""; - String containerSuffix = ""; - String containerPrefix = ""; - if (prefix == null) { - // style=form, explode=true, e.g. /pet?name=cat&type=manx - prefix = ""; - } else { - // deepObject style e.g. /pet?id[name]=cat&id[type]=manx - prefix = prefix + "["; - suffix = "]"; - containerSuffix = "]"; - containerPrefix = "["; - } - - StringJoiner joiner = new StringJoiner("&"); - - // add `name` to the URL query string - if (getName() != null) { - joiner.add(String.format("%sname%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getName()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); - } - - // add `pet_type` to the URL query string - if (getPetType() != null) { - joiner.add(String.format("%spet_type%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getPetType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); - } - - return joiner.toString(); - } -} - diff --git a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/DogAllOf.java b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/DogAllOf.java deleted file mode 100644 index 82d93902a71..00000000000 --- a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/DogAllOf.java +++ /dev/null @@ -1,150 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import java.net.URLEncoder; -import java.nio.charset.StandardCharsets; -import java.util.StringJoiner; -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - - -/** - * DogAllOf - */ -@JsonPropertyOrder({ - DogAllOf.JSON_PROPERTY_BREED -}) -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DogAllOf { - public static final String JSON_PROPERTY_BREED = "breed"; - private String breed; - - public DogAllOf() { - } - - public DogAllOf breed(String breed) { - this.breed = breed; - return this; - } - - /** - * Get breed - * @return breed - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_BREED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getBreed() { - return breed; - } - - - @JsonProperty(JSON_PROPERTY_BREED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setBreed(String breed) { - this.breed = breed; - } - - - /** - * Return true if this Dog_allOf object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DogAllOf dogAllOf = (DogAllOf) o; - return Objects.equals(this.breed, dogAllOf.breed); - } - - @Override - public int hashCode() { - return Objects.hash(breed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DogAllOf {\n"); - sb.append(" breed: ").append(toIndentedString(breed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - /** - * Convert the instance into URL query string. - * - * @return URL query string - */ - public String toUrlQueryString() { - return toUrlQueryString(null); - } - - /** - * Convert the instance into URL query string. - * - * @param prefix prefix of the query string - * @return URL query string - */ - public String toUrlQueryString(String prefix) { - String suffix = ""; - String containerSuffix = ""; - String containerPrefix = ""; - if (prefix == null) { - // style=form, explode=true, e.g. /pet?name=cat&type=manx - prefix = ""; - } else { - // deepObject style e.g. /pet?id[name]=cat&id[type]=manx - prefix = prefix + "["; - suffix = "]"; - containerSuffix = "]"; - containerPrefix = "["; - } - - StringJoiner joiner = new StringJoiner("&"); - - // add `breed` to the URL query string - if (getBreed() != null) { - joiner.add(String.format("%sbreed%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getBreed()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); - } - - return joiner.toString(); - } -} - diff --git a/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/CatAllOfTest.java b/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/CatAllOfTest.java deleted file mode 100644 index 269bdbe11b7..00000000000 --- a/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/CatAllOfTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for CatAllOf - */ -public class CatAllOfTest { - private final CatAllOf model = new CatAllOf(); - - /** - * Model tests for CatAllOf - */ - @Test - public void testCatAllOf() { - // TODO: test CatAllOf - } - - /** - * Test the property 'declawed' - */ - @Test - public void declawedTest() { - // TODO: test declawed - } - -} diff --git a/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/ChildCatAllOfTest.java b/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/ChildCatAllOfTest.java deleted file mode 100644 index 99923d52c56..00000000000 --- a/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/ChildCatAllOfTest.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.Set; -import java.util.HashSet; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for ChildCatAllOf - */ -public class ChildCatAllOfTest { - private final ChildCatAllOf model = new ChildCatAllOf(); - - /** - * Model tests for ChildCatAllOf - */ - @Test - public void testChildCatAllOf() { - // TODO: test ChildCatAllOf - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - - /** - * Test the property 'petType' - */ - @Test - public void petTypeTest() { - // TODO: test petType - } - -} diff --git a/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/DogAllOfTest.java b/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/DogAllOfTest.java deleted file mode 100644 index dfa91c25ec8..00000000000 --- a/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/DogAllOfTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for DogAllOf - */ -public class DogAllOfTest { - private final DogAllOf model = new DogAllOf(); - - /** - * Model tests for DogAllOf - */ - @Test - public void testDogAllOf() { - // TODO: test DogAllOf - } - - /** - * Test the property 'breed' - */ - @Test - public void breedTest() { - // TODO: test breed - } - -} diff --git a/samples/client/petstore/java/native/.openapi-generator/FILES b/samples/client/petstore/java/native/.openapi-generator/FILES index 4d1e9c20b36..e9f85bd9da8 100644 --- a/samples/client/petstore/java/native/.openapi-generator/FILES +++ b/samples/client/petstore/java/native/.openapi-generator/FILES @@ -18,10 +18,8 @@ docs/BananaReq.md docs/BasquePig.md docs/Capitalization.md docs/Cat.md -docs/CatAllOf.md docs/Category.md docs/ChildCat.md -docs/ChildCatAllOf.md docs/ClassModel.md docs/Client.md docs/ComplexQuadrilateral.md @@ -29,7 +27,6 @@ docs/DanishPig.md docs/DefaultApi.md docs/DeprecatedObject.md docs/Dog.md -docs/DogAllOf.md docs/Drawing.md docs/EnumArrays.md docs/EnumClass.md @@ -127,17 +124,14 @@ src/main/java/org/openapitools/client/model/BananaReq.java src/main/java/org/openapitools/client/model/BasquePig.java src/main/java/org/openapitools/client/model/Capitalization.java src/main/java/org/openapitools/client/model/Cat.java -src/main/java/org/openapitools/client/model/CatAllOf.java src/main/java/org/openapitools/client/model/Category.java src/main/java/org/openapitools/client/model/ChildCat.java -src/main/java/org/openapitools/client/model/ChildCatAllOf.java src/main/java/org/openapitools/client/model/ClassModel.java src/main/java/org/openapitools/client/model/Client.java src/main/java/org/openapitools/client/model/ComplexQuadrilateral.java src/main/java/org/openapitools/client/model/DanishPig.java src/main/java/org/openapitools/client/model/DeprecatedObject.java src/main/java/org/openapitools/client/model/Dog.java -src/main/java/org/openapitools/client/model/DogAllOf.java src/main/java/org/openapitools/client/model/Drawing.java src/main/java/org/openapitools/client/model/EnumArrays.java src/main/java/org/openapitools/client/model/EnumClass.java diff --git a/samples/client/petstore/java/native/README.md b/samples/client/petstore/java/native/README.md index ea628ced967..7b563c172f6 100644 --- a/samples/client/petstore/java/native/README.md +++ b/samples/client/petstore/java/native/README.md @@ -201,17 +201,14 @@ Class | Method | HTTP request | Description - [BasquePig](docs/BasquePig.md) - [Capitalization](docs/Capitalization.md) - [Cat](docs/Cat.md) - - [CatAllOf](docs/CatAllOf.md) - [Category](docs/Category.md) - [ChildCat](docs/ChildCat.md) - - [ChildCatAllOf](docs/ChildCatAllOf.md) - [ClassModel](docs/ClassModel.md) - [Client](docs/Client.md) - [ComplexQuadrilateral](docs/ComplexQuadrilateral.md) - [DanishPig](docs/DanishPig.md) - [DeprecatedObject](docs/DeprecatedObject.md) - [Dog](docs/Dog.md) - - [DogAllOf](docs/DogAllOf.md) - [Drawing](docs/Drawing.md) - [EnumArrays](docs/EnumArrays.md) - [EnumClass](docs/EnumClass.md) diff --git a/samples/client/petstore/java/native/api/openapi.yaml b/samples/client/petstore/java/native/api/openapi.yaml index 6b583fd4056..a46f3a68fd8 100644 --- a/samples/client/petstore/java/native/api/openapi.yaml +++ b/samples/client/petstore/java/native/api/openapi.yaml @@ -1431,12 +1431,18 @@ components: Dog: allOf: - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Dog_allOf' + - properties: + breed: + type: string + type: object Cat: allOf: - $ref: '#/components/schemas/Animal' - $ref: '#/components/schemas/Address' - - $ref: '#/components/schemas/Cat_allOf' + - properties: + declawed: + type: boolean + type: object Address: additionalProperties: type: integer @@ -2118,7 +2124,16 @@ components: ChildCat: allOf: - $ref: '#/components/schemas/ParentPet' - - $ref: '#/components/schemas/ChildCat_allOf' + - properties: + name: + type: string + pet_type: + default: ChildCat + enum: + - ChildCat + type: string + x-enum-as-string: true + type: object ArrayOfEnums: items: $ref: '#/components/schemas/OuterEnum' @@ -2307,30 +2322,6 @@ components: required: - requiredFile type: object - Dog_allOf: - properties: - breed: - type: string - type: object - example: null - Cat_allOf: - properties: - declawed: - type: boolean - type: object - example: null - ChildCat_allOf: - properties: - name: - type: string - pet_type: - default: ChildCat - enum: - - ChildCat - type: string - x-enum-as-string: true - type: object - example: null securitySchemes: petstore_auth: flows: diff --git a/samples/client/petstore/java/native/docs/BigCatAllOf.md b/samples/client/petstore/java/native/docs/BigCatAllOf.md deleted file mode 100644 index 2bee213a607..00000000000 --- a/samples/client/petstore/java/native/docs/BigCatAllOf.md +++ /dev/null @@ -1,24 +0,0 @@ - - -# BigCatAllOf - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**kind** | [**KindEnum**](#KindEnum) | | [optional] | - - - -## Enum: KindEnum - -| Name | Value | -|---- | -----| -| LIONS | "lions" | -| TIGERS | "tigers" | -| LEOPARDS | "leopards" | -| JAGUARS | "jaguars" | - - - diff --git a/samples/client/petstore/java/native/docs/CatAllOf.md b/samples/client/petstore/java/native/docs/CatAllOf.md deleted file mode 100644 index 926bc0abd78..00000000000 --- a/samples/client/petstore/java/native/docs/CatAllOf.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# CatAllOf - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**declawed** | **Boolean** | | [optional] | - - - diff --git a/samples/client/petstore/java/native/docs/ChildCatAllOf.md b/samples/client/petstore/java/native/docs/ChildCatAllOf.md deleted file mode 100644 index 35fac5c5f09..00000000000 --- a/samples/client/petstore/java/native/docs/ChildCatAllOf.md +++ /dev/null @@ -1,22 +0,0 @@ - - -# ChildCatAllOf - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**name** | **String** | | [optional] | -|**petType** | [**String**](#String) | | [optional] | - - - -## Enum: String - -| Name | Value | -|---- | -----| -| CHILDCAT | "ChildCat" | - - - diff --git a/samples/client/petstore/java/native/docs/DogAllOf.md b/samples/client/petstore/java/native/docs/DogAllOf.md deleted file mode 100644 index d4e4ea0d548..00000000000 --- a/samples/client/petstore/java/native/docs/DogAllOf.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# DogAllOf - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**breed** | **String** | | [optional] | - - - diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/BigCatAllOf.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/BigCatAllOf.java deleted file mode 100644 index 7b3f8bb4d9d..00000000000 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/BigCatAllOf.java +++ /dev/null @@ -1,147 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - - -/** - * BigCatAllOf - */ -@JsonPropertyOrder({ - BigCatAllOf.JSON_PROPERTY_KIND -}) -@javax.annotation.processing.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class BigCatAllOf { - /** - * Gets or Sets kind - */ - public enum KindEnum { - LIONS("lions"), - - TIGERS("tigers"), - - LEOPARDS("leopards"), - - JAGUARS("jaguars"); - - private String value; - - KindEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static KindEnum fromValue(String value) { - for (KindEnum b : KindEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - public static final String JSON_PROPERTY_KIND = "kind"; - private KindEnum kind; - - public BigCatAllOf() { - } - - public BigCatAllOf kind(KindEnum kind) { - this.kind = kind; - return this; - } - - /** - * Get kind - * @return kind - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_KIND) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public KindEnum getKind() { - return kind; - } - - - @JsonProperty(JSON_PROPERTY_KIND) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setKind(KindEnum kind) { - this.kind = kind; - } - - - /** - * Return true if this BigCat_allOf object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BigCatAllOf bigCatAllOf = (BigCatAllOf) o; - return Objects.equals(this.kind, bigCatAllOf.kind); - } - - @Override - public int hashCode() { - return Objects.hash(kind); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BigCatAllOf {\n"); - sb.append(" kind: ").append(toIndentedString(kind)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/CatAllOf.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/CatAllOf.java deleted file mode 100644 index 488de1e892e..00000000000 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/CatAllOf.java +++ /dev/null @@ -1,150 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import java.net.URLEncoder; -import java.nio.charset.StandardCharsets; -import java.util.StringJoiner; -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - - -/** - * CatAllOf - */ -@JsonPropertyOrder({ - CatAllOf.JSON_PROPERTY_DECLAWED -}) -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CatAllOf { - public static final String JSON_PROPERTY_DECLAWED = "declawed"; - private Boolean declawed; - - public CatAllOf() { - } - - public CatAllOf declawed(Boolean declawed) { - this.declawed = declawed; - return this; - } - - /** - * Get declawed - * @return declawed - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DECLAWED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Boolean getDeclawed() { - return declawed; - } - - - @JsonProperty(JSON_PROPERTY_DECLAWED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDeclawed(Boolean declawed) { - this.declawed = declawed; - } - - - /** - * Return true if this Cat_allOf object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CatAllOf catAllOf = (CatAllOf) o; - return Objects.equals(this.declawed, catAllOf.declawed); - } - - @Override - public int hashCode() { - return Objects.hash(declawed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CatAllOf {\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - /** - * Convert the instance into URL query string. - * - * @return URL query string - */ - public String toUrlQueryString() { - return toUrlQueryString(null); - } - - /** - * Convert the instance into URL query string. - * - * @param prefix prefix of the query string - * @return URL query string - */ - public String toUrlQueryString(String prefix) { - String suffix = ""; - String containerSuffix = ""; - String containerPrefix = ""; - if (prefix == null) { - // style=form, explode=true, e.g. /pet?name=cat&type=manx - prefix = ""; - } else { - // deepObject style e.g. /pet?id[name]=cat&id[type]=manx - prefix = prefix + "["; - suffix = "]"; - containerSuffix = "]"; - containerPrefix = "["; - } - - StringJoiner joiner = new StringJoiner("&"); - - // add `declawed` to the URL query string - if (getDeclawed() != null) { - joiner.add(String.format("%sdeclawed%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getDeclawed()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); - } - - return joiner.toString(); - } -} - diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ChildCatAllOf.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ChildCatAllOf.java deleted file mode 100644 index dd086c58f56..00000000000 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ChildCatAllOf.java +++ /dev/null @@ -1,200 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import java.net.URLEncoder; -import java.nio.charset.StandardCharsets; -import java.util.StringJoiner; -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.Set; -import java.util.HashSet; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - - -/** - * ChildCatAllOf - */ -@JsonPropertyOrder({ - ChildCatAllOf.JSON_PROPERTY_NAME, - ChildCatAllOf.JSON_PROPERTY_PET_TYPE -}) -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ChildCatAllOf { - public static final String JSON_PROPERTY_NAME = "name"; - private String name; - - public static final String JSON_PROPERTY_PET_TYPE = "pet_type"; - private String petType = "ChildCat"; - - public ChildCatAllOf() { - } - - public ChildCatAllOf name(String name) { - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getName() { - return name; - } - - - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { - this.name = name; - } - - - public static final Set PET_TYPE_VALUES = new HashSet<>(Arrays.asList( - "ChildCat" - )); - - public ChildCatAllOf petType(String petType) { - if (!PET_TYPE_VALUES.contains(petType)) { - throw new IllegalArgumentException(petType + " is invalid. Possible values for petType: " + String.join(", ", PET_TYPE_VALUES)); - } - - this.petType = petType; - return this; - } - - /** - * Get petType - * @return petType - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PET_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getPetType() { - return petType; - } - - - @JsonProperty(JSON_PROPERTY_PET_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPetType(String petType) { - if (!PET_TYPE_VALUES.contains(petType)) { - throw new IllegalArgumentException(petType + " is invalid. Possible values for petType: " + String.join(", ", PET_TYPE_VALUES)); - } - - this.petType = petType; - } - - - /** - * Return true if this ChildCat_allOf object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ChildCatAllOf childCatAllOf = (ChildCatAllOf) o; - return Objects.equals(this.name, childCatAllOf.name) && - Objects.equals(this.petType, childCatAllOf.petType); - } - - @Override - public int hashCode() { - return Objects.hash(name, petType); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ChildCatAllOf {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" petType: ").append(toIndentedString(petType)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - /** - * Convert the instance into URL query string. - * - * @return URL query string - */ - public String toUrlQueryString() { - return toUrlQueryString(null); - } - - /** - * Convert the instance into URL query string. - * - * @param prefix prefix of the query string - * @return URL query string - */ - public String toUrlQueryString(String prefix) { - String suffix = ""; - String containerSuffix = ""; - String containerPrefix = ""; - if (prefix == null) { - // style=form, explode=true, e.g. /pet?name=cat&type=manx - prefix = ""; - } else { - // deepObject style e.g. /pet?id[name]=cat&id[type]=manx - prefix = prefix + "["; - suffix = "]"; - containerSuffix = "]"; - containerPrefix = "["; - } - - StringJoiner joiner = new StringJoiner("&"); - - // add `name` to the URL query string - if (getName() != null) { - joiner.add(String.format("%sname%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getName()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); - } - - // add `pet_type` to the URL query string - if (getPetType() != null) { - joiner.add(String.format("%spet_type%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getPetType()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); - } - - return joiner.toString(); - } -} - diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/DogAllOf.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/DogAllOf.java deleted file mode 100644 index 82d93902a71..00000000000 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/DogAllOf.java +++ /dev/null @@ -1,150 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import java.net.URLEncoder; -import java.nio.charset.StandardCharsets; -import java.util.StringJoiner; -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - - -/** - * DogAllOf - */ -@JsonPropertyOrder({ - DogAllOf.JSON_PROPERTY_BREED -}) -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DogAllOf { - public static final String JSON_PROPERTY_BREED = "breed"; - private String breed; - - public DogAllOf() { - } - - public DogAllOf breed(String breed) { - this.breed = breed; - return this; - } - - /** - * Get breed - * @return breed - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_BREED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getBreed() { - return breed; - } - - - @JsonProperty(JSON_PROPERTY_BREED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setBreed(String breed) { - this.breed = breed; - } - - - /** - * Return true if this Dog_allOf object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DogAllOf dogAllOf = (DogAllOf) o; - return Objects.equals(this.breed, dogAllOf.breed); - } - - @Override - public int hashCode() { - return Objects.hash(breed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DogAllOf {\n"); - sb.append(" breed: ").append(toIndentedString(breed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - /** - * Convert the instance into URL query string. - * - * @return URL query string - */ - public String toUrlQueryString() { - return toUrlQueryString(null); - } - - /** - * Convert the instance into URL query string. - * - * @param prefix prefix of the query string - * @return URL query string - */ - public String toUrlQueryString(String prefix) { - String suffix = ""; - String containerSuffix = ""; - String containerPrefix = ""; - if (prefix == null) { - // style=form, explode=true, e.g. /pet?name=cat&type=manx - prefix = ""; - } else { - // deepObject style e.g. /pet?id[name]=cat&id[type]=manx - prefix = prefix + "["; - suffix = "]"; - containerSuffix = "]"; - containerPrefix = "["; - } - - StringJoiner joiner = new StringJoiner("&"); - - // add `breed` to the URL query string - if (getBreed() != null) { - joiner.add(String.format("%sbreed%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getBreed()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); - } - - return joiner.toString(); - } -} - diff --git a/samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/CatAllOfTest.java b/samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/CatAllOfTest.java deleted file mode 100644 index 269bdbe11b7..00000000000 --- a/samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/CatAllOfTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for CatAllOf - */ -public class CatAllOfTest { - private final CatAllOf model = new CatAllOf(); - - /** - * Model tests for CatAllOf - */ - @Test - public void testCatAllOf() { - // TODO: test CatAllOf - } - - /** - * Test the property 'declawed' - */ - @Test - public void declawedTest() { - // TODO: test declawed - } - -} diff --git a/samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/ChildCatAllOfTest.java b/samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/ChildCatAllOfTest.java deleted file mode 100644 index 99923d52c56..00000000000 --- a/samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/ChildCatAllOfTest.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.Set; -import java.util.HashSet; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for ChildCatAllOf - */ -public class ChildCatAllOfTest { - private final ChildCatAllOf model = new ChildCatAllOf(); - - /** - * Model tests for ChildCatAllOf - */ - @Test - public void testChildCatAllOf() { - // TODO: test ChildCatAllOf - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - - /** - * Test the property 'petType' - */ - @Test - public void petTypeTest() { - // TODO: test petType - } - -} diff --git a/samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/DogAllOfTest.java b/samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/DogAllOfTest.java deleted file mode 100644 index dfa91c25ec8..00000000000 --- a/samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/DogAllOfTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for DogAllOf - */ -public class DogAllOfTest { - private final DogAllOf model = new DogAllOf(); - - /** - * Model tests for DogAllOf - */ - @Test - public void testDogAllOf() { - // TODO: test DogAllOf - } - - /** - * Test the property 'breed' - */ - @Test - public void breedTest() { - // TODO: test breed - } - -} diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/.openapi-generator/FILES b/samples/client/petstore/java/okhttp-gson-dynamicOperations/.openapi-generator/FILES index 6421a5fdb8d..cba78e5b9a9 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/.openapi-generator/FILES +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/.openapi-generator/FILES @@ -18,15 +18,12 @@ docs/ArrayOfArrayOfNumberOnly.md docs/ArrayOfNumberOnly.md docs/ArrayTest.md docs/BigCat.md -docs/BigCatAllOf.md docs/Capitalization.md docs/Cat.md -docs/CatAllOf.md docs/Category.md docs/ClassModel.md docs/Client.md docs/Dog.md -docs/DogAllOf.md docs/EnumArrays.md docs/EnumClass.md docs/EnumTest.md @@ -109,15 +106,12 @@ src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java src/main/java/org/openapitools/client/model/ArrayTest.java src/main/java/org/openapitools/client/model/BigCat.java -src/main/java/org/openapitools/client/model/BigCatAllOf.java src/main/java/org/openapitools/client/model/Capitalization.java src/main/java/org/openapitools/client/model/Cat.java -src/main/java/org/openapitools/client/model/CatAllOf.java src/main/java/org/openapitools/client/model/Category.java src/main/java/org/openapitools/client/model/ClassModel.java src/main/java/org/openapitools/client/model/Client.java src/main/java/org/openapitools/client/model/Dog.java -src/main/java/org/openapitools/client/model/DogAllOf.java src/main/java/org/openapitools/client/model/EnumArrays.java src/main/java/org/openapitools/client/model/EnumClass.java src/main/java/org/openapitools/client/model/EnumTest.java diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/README.md b/samples/client/petstore/java/okhttp-gson-dynamicOperations/README.md index 591ed247b04..f4d7e69f9a5 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/README.md +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/README.md @@ -167,15 +167,12 @@ Class | Method | HTTP request | Description - [ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md) - [ArrayTest](docs/ArrayTest.md) - [BigCat](docs/BigCat.md) - - [BigCatAllOf](docs/BigCatAllOf.md) - [Capitalization](docs/Capitalization.md) - [Cat](docs/Cat.md) - - [CatAllOf](docs/CatAllOf.md) - [Category](docs/Category.md) - [ClassModel](docs/ClassModel.md) - [Client](docs/Client.md) - [Dog](docs/Dog.md) - - [DogAllOf](docs/DogAllOf.md) - [EnumArrays](docs/EnumArrays.md) - [EnumClass](docs/EnumClass.md) - [EnumTest](docs/EnumTest.md) diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/BigCatAllOf.md b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/BigCatAllOf.md deleted file mode 100644 index 2bee213a607..00000000000 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/BigCatAllOf.md +++ /dev/null @@ -1,24 +0,0 @@ - - -# BigCatAllOf - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**kind** | [**KindEnum**](#KindEnum) | | [optional] | - - - -## Enum: KindEnum - -| Name | Value | -|---- | -----| -| LIONS | "lions" | -| TIGERS | "tigers" | -| LEOPARDS | "leopards" | -| JAGUARS | "jaguars" | - - - diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/CatAllOf.md b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/CatAllOf.md deleted file mode 100644 index 926bc0abd78..00000000000 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/CatAllOf.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# CatAllOf - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**declawed** | **Boolean** | | [optional] | - - - diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/DogAllOf.md b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/DogAllOf.md deleted file mode 100644 index d4e4ea0d548..00000000000 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/DogAllOf.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# DogAllOf - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**breed** | **String** | | [optional] | - - - diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/JSON.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/JSON.java index c2662b33fbf..3f5a7126f4d 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/JSON.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/JSON.java @@ -145,14 +145,11 @@ public class JSON { gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ArrayOfNumberOnly.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ArrayTest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.BigCat.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.BigCatAllOf.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Capitalization.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CatAllOf.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Category.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ClassModel.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Client.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Dog.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.DogAllOf.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.EnumArrays.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.EnumTest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.FileSchemaTestClass.CustomTypeAdapterFactory()); diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/BigCatAllOf.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/BigCatAllOf.java deleted file mode 100644 index cd4f9b4dfd8..00000000000 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/BigCatAllOf.java +++ /dev/null @@ -1,259 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * BigCatAllOf - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class BigCatAllOf { - /** - * Gets or Sets kind - */ - @JsonAdapter(KindEnum.Adapter.class) - public enum KindEnum { - LIONS("lions"), - - TIGERS("tigers"), - - LEOPARDS("leopards"), - - JAGUARS("jaguars"); - - private String value; - - KindEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static KindEnum fromValue(String value) { - for (KindEnum b : KindEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final KindEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public KindEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return KindEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_KIND = "kind"; - @SerializedName(SERIALIZED_NAME_KIND) - private KindEnum kind; - - public BigCatAllOf() { - } - - public BigCatAllOf kind(KindEnum kind) { - - this.kind = kind; - return this; - } - - /** - * Get kind - * @return kind - **/ - @javax.annotation.Nullable - public KindEnum getKind() { - return kind; - } - - - public void setKind(KindEnum kind) { - this.kind = kind; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BigCatAllOf bigCatAllOf = (BigCatAllOf) o; - return Objects.equals(this.kind, bigCatAllOf.kind); - } - - @Override - public int hashCode() { - return Objects.hash(kind); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BigCatAllOf {\n"); - sb.append(" kind: ").append(toIndentedString(kind)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("kind"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to BigCatAllOf - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!BigCatAllOf.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in BigCatAllOf is not found in the empty JSON string", BigCatAllOf.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!BigCatAllOf.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `BigCatAllOf` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("kind") != null && !jsonObj.get("kind").isJsonNull()) && !jsonObj.get("kind").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `kind` to be a primitive type in the JSON string but got `%s`", jsonObj.get("kind").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!BigCatAllOf.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'BigCatAllOf' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(BigCatAllOf.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, BigCatAllOf value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public BigCatAllOf read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of BigCatAllOf given an JSON string - * - * @param jsonString JSON string - * @return An instance of BigCatAllOf - * @throws IOException if the JSON string is invalid with respect to BigCatAllOf - */ - public static BigCatAllOf fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, BigCatAllOf.class); - } - - /** - * Convert an instance of BigCatAllOf to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/CatAllOf.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/CatAllOf.java deleted file mode 100644 index 60fc1abd12f..00000000000 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/CatAllOf.java +++ /dev/null @@ -1,205 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CatAllOf - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CatAllOf { - public static final String SERIALIZED_NAME_DECLAWED = "declawed"; - @SerializedName(SERIALIZED_NAME_DECLAWED) - private Boolean declawed; - - public CatAllOf() { - } - - public CatAllOf declawed(Boolean declawed) { - - this.declawed = declawed; - return this; - } - - /** - * Get declawed - * @return declawed - **/ - @javax.annotation.Nullable - public Boolean getDeclawed() { - return declawed; - } - - - public void setDeclawed(Boolean declawed) { - this.declawed = declawed; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CatAllOf catAllOf = (CatAllOf) o; - return Objects.equals(this.declawed, catAllOf.declawed); - } - - @Override - public int hashCode() { - return Objects.hash(declawed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CatAllOf {\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("declawed"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CatAllOf - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CatAllOf.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CatAllOf is not found in the empty JSON string", CatAllOf.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CatAllOf.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CatAllOf` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CatAllOf.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CatAllOf' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CatAllOf.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CatAllOf value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CatAllOf read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CatAllOf given an JSON string - * - * @param jsonString JSON string - * @return An instance of CatAllOf - * @throws IOException if the JSON string is invalid with respect to CatAllOf - */ - public static CatAllOf fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CatAllOf.class); - } - - /** - * Convert an instance of CatAllOf to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/DogAllOf.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/DogAllOf.java deleted file mode 100644 index 09f14d18fe5..00000000000 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/DogAllOf.java +++ /dev/null @@ -1,208 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * DogAllOf - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DogAllOf { - public static final String SERIALIZED_NAME_BREED = "breed"; - @SerializedName(SERIALIZED_NAME_BREED) - private String breed; - - public DogAllOf() { - } - - public DogAllOf breed(String breed) { - - this.breed = breed; - return this; - } - - /** - * Get breed - * @return breed - **/ - @javax.annotation.Nullable - public String getBreed() { - return breed; - } - - - public void setBreed(String breed) { - this.breed = breed; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DogAllOf dogAllOf = (DogAllOf) o; - return Objects.equals(this.breed, dogAllOf.breed); - } - - @Override - public int hashCode() { - return Objects.hash(breed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DogAllOf {\n"); - sb.append(" breed: ").append(toIndentedString(breed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("breed"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to DogAllOf - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DogAllOf.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in DogAllOf is not found in the empty JSON string", DogAllOf.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DogAllOf.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `DogAllOf` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("breed") != null && !jsonObj.get("breed").isJsonNull()) && !jsonObj.get("breed").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `breed` to be a primitive type in the JSON string but got `%s`", jsonObj.get("breed").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DogAllOf.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DogAllOf' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(DogAllOf.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, DogAllOf value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DogAllOf read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of DogAllOf given an JSON string - * - * @param jsonString JSON string - * @return An instance of DogAllOf - * @throws IOException if the JSON string is invalid with respect to DogAllOf - */ - public static DogAllOf fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DogAllOf.class); - } - - /** - * Convert an instance of DogAllOf to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/resources/openapi/openapi.yaml b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/resources/openapi/openapi.yaml index e7e17402f6f..dbf370f445d 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/resources/openapi/openapi.yaml +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/resources/openapi/openapi.yaml @@ -1364,15 +1364,29 @@ components: Dog: allOf: - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Dog_allOf' + - properties: + breed: + type: string + type: object Cat: allOf: - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Cat_allOf' + - properties: + declawed: + type: boolean + type: object BigCat: allOf: - $ref: '#/components/schemas/Cat' - - $ref: '#/components/schemas/BigCat_allOf' + - properties: + kind: + enum: + - lions + - tigers + - leopards + - jaguars + type: string + type: object Animal: discriminator: propertyName: className @@ -2165,29 +2179,6 @@ components: required: - requiredFile type: object - Dog_allOf: - properties: - breed: - type: string - type: object - example: null - Cat_allOf: - properties: - declawed: - type: boolean - type: object - example: null - BigCat_allOf: - properties: - kind: - enum: - - lions - - tigers - - leopards - - jaguars - type: string - type: object - example: null securitySchemes: petstore_auth: flows: diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/BigCatAllOfTest.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/BigCatAllOfTest.java deleted file mode 100644 index 59025b11722..00000000000 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/BigCatAllOfTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - - -/** - * Model tests for BigCatAllOf - */ -public class BigCatAllOfTest { - private final BigCatAllOf model = new BigCatAllOf(); - - /** - * Model tests for BigCatAllOf - */ - @Test - public void testBigCatAllOf() { - // TODO: test BigCatAllOf - } - - /** - * Test the property 'kind' - */ - @Test - public void kindTest() { - // TODO: test kind - } - -} diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/BigCatTest.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/BigCatTest.java index 4d39b1f814e..e2f41cc959c 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/BigCatTest.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/BigCatTest.java @@ -18,15 +18,11 @@ import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; -import org.openapitools.client.model.BigCatAllOf; import org.openapitools.client.model.Cat; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; - /** * Model tests for BigCat */ diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/CatAllOfTest.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/CatAllOfTest.java deleted file mode 100644 index c2f6bb72a5b..00000000000 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/CatAllOfTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - - -/** - * Model tests for CatAllOf - */ -public class CatAllOfTest { - private final CatAllOf model = new CatAllOf(); - - /** - * Model tests for CatAllOf - */ - @Test - public void testCatAllOf() { - // TODO: test CatAllOf - } - - /** - * Test the property 'declawed' - */ - @Test - public void declawedTest() { - // TODO: test declawed - } - -} diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/DogAllOfTest.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/DogAllOfTest.java deleted file mode 100644 index f877f02e849..00000000000 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/model/DogAllOfTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - - -/** - * Model tests for DogAllOf - */ -public class DogAllOfTest { - private final DogAllOf model = new DogAllOf(); - - /** - * Model tests for DogAllOf - */ - @Test - public void testDogAllOf() { - // TODO: test DogAllOf - } - - /** - * Test the property 'breed' - */ - @Test - public void breedTest() { - // TODO: test breed - } - -} diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/.openapi-generator/FILES b/samples/client/petstore/java/okhttp-gson-parcelableModel/.openapi-generator/FILES index 2d7bc290cd0..c689d355395 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/.openapi-generator/FILES +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/.openapi-generator/FILES @@ -19,15 +19,12 @@ docs/ArrayOfArrayOfNumberOnly.md docs/ArrayOfNumberOnly.md docs/ArrayTest.md docs/BigCat.md -docs/BigCatAllOf.md docs/Capitalization.md docs/Cat.md -docs/CatAllOf.md docs/Category.md docs/ClassModel.md docs/Client.md docs/Dog.md -docs/DogAllOf.md docs/EnumArrays.md docs/EnumClass.md docs/EnumTest.md @@ -109,15 +106,12 @@ src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java src/main/java/org/openapitools/client/model/ArrayTest.java src/main/java/org/openapitools/client/model/BigCat.java -src/main/java/org/openapitools/client/model/BigCatAllOf.java src/main/java/org/openapitools/client/model/Capitalization.java src/main/java/org/openapitools/client/model/Cat.java -src/main/java/org/openapitools/client/model/CatAllOf.java src/main/java/org/openapitools/client/model/Category.java src/main/java/org/openapitools/client/model/ClassModel.java src/main/java/org/openapitools/client/model/Client.java src/main/java/org/openapitools/client/model/Dog.java -src/main/java/org/openapitools/client/model/DogAllOf.java src/main/java/org/openapitools/client/model/EnumArrays.java src/main/java/org/openapitools/client/model/EnumClass.java src/main/java/org/openapitools/client/model/EnumTest.java diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/README.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/README.md index e3216480bd4..ec48f311ce8 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/README.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/README.md @@ -167,15 +167,12 @@ Class | Method | HTTP request | Description - [ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md) - [ArrayTest](docs/ArrayTest.md) - [BigCat](docs/BigCat.md) - - [BigCatAllOf](docs/BigCatAllOf.md) - [Capitalization](docs/Capitalization.md) - [Cat](docs/Cat.md) - - [CatAllOf](docs/CatAllOf.md) - [Category](docs/Category.md) - [ClassModel](docs/ClassModel.md) - [Client](docs/Client.md) - [Dog](docs/Dog.md) - - [DogAllOf](docs/DogAllOf.md) - [EnumArrays](docs/EnumArrays.md) - [EnumClass](docs/EnumClass.md) - [EnumTest](docs/EnumTest.md) diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/api/openapi.yaml b/samples/client/petstore/java/okhttp-gson-parcelableModel/api/openapi.yaml index e7e17402f6f..dbf370f445d 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/api/openapi.yaml +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/api/openapi.yaml @@ -1364,15 +1364,29 @@ components: Dog: allOf: - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Dog_allOf' + - properties: + breed: + type: string + type: object Cat: allOf: - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Cat_allOf' + - properties: + declawed: + type: boolean + type: object BigCat: allOf: - $ref: '#/components/schemas/Cat' - - $ref: '#/components/schemas/BigCat_allOf' + - properties: + kind: + enum: + - lions + - tigers + - leopards + - jaguars + type: string + type: object Animal: discriminator: propertyName: className @@ -2165,29 +2179,6 @@ components: required: - requiredFile type: object - Dog_allOf: - properties: - breed: - type: string - type: object - example: null - Cat_allOf: - properties: - declawed: - type: boolean - type: object - example: null - BigCat_allOf: - properties: - kind: - enum: - - lions - - tigers - - leopards - - jaguars - type: string - type: object - example: null securitySchemes: petstore_auth: flows: diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/BigCatAllOf.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/BigCatAllOf.md deleted file mode 100644 index b1dfbe0c7b3..00000000000 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/BigCatAllOf.md +++ /dev/null @@ -1,28 +0,0 @@ - - -# BigCatAllOf - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**kind** | [**KindEnum**](#KindEnum) | | [optional] | - - - -## Enum: KindEnum - -| Name | Value | -|---- | -----| -| LIONS | "lions" | -| TIGERS | "tigers" | -| LEOPARDS | "leopards" | -| JAGUARS | "jaguars" | - - -## Implemented Interfaces - -* Parcelable - - diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/CatAllOf.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/CatAllOf.md deleted file mode 100644 index 4e24aa875df..00000000000 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/CatAllOf.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# CatAllOf - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**declawed** | **Boolean** | | [optional] | - - -## Implemented Interfaces - -* Parcelable - - diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/DogAllOf.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/DogAllOf.md deleted file mode 100644 index 71d59a7ea04..00000000000 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/DogAllOf.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# DogAllOf - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**breed** | **String** | | [optional] | - - -## Implemented Interfaces - -* Parcelable - - diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/JSON.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/JSON.java index c2662b33fbf..3f5a7126f4d 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/JSON.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/JSON.java @@ -145,14 +145,11 @@ public class JSON { gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ArrayOfNumberOnly.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ArrayTest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.BigCat.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.BigCatAllOf.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Capitalization.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CatAllOf.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Category.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ClassModel.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Client.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Dog.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.DogAllOf.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.EnumArrays.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.EnumTest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.FileSchemaTestClass.CustomTypeAdapterFactory()); diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/BigCatAllOf.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/BigCatAllOf.java deleted file mode 100644 index 6736271e385..00000000000 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/BigCatAllOf.java +++ /dev/null @@ -1,282 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import android.os.Parcelable; -import android.os.Parcel; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * BigCatAllOf - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class BigCatAllOf implements Parcelable { - /** - * Gets or Sets kind - */ - @JsonAdapter(KindEnum.Adapter.class) - public enum KindEnum { - LIONS("lions"), - - TIGERS("tigers"), - - LEOPARDS("leopards"), - - JAGUARS("jaguars"); - - private String value; - - KindEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static KindEnum fromValue(String value) { - for (KindEnum b : KindEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final KindEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public KindEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return KindEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_KIND = "kind"; - @SerializedName(SERIALIZED_NAME_KIND) - private KindEnum kind; - - public BigCatAllOf() { - } - - public BigCatAllOf kind(KindEnum kind) { - - this.kind = kind; - return this; - } - - /** - * Get kind - * @return kind - **/ - @javax.annotation.Nullable - public KindEnum getKind() { - return kind; - } - - - public void setKind(KindEnum kind) { - this.kind = kind; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BigCatAllOf bigCatAllOf = (BigCatAllOf) o; - return Objects.equals(this.kind, bigCatAllOf.kind); - } - - @Override - public int hashCode() { - return Objects.hash(kind); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BigCatAllOf {\n"); - sb.append(" kind: ").append(toIndentedString(kind)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public void writeToParcel(Parcel out, int flags) { - out.writeValue(kind); - } - - BigCatAllOf(Parcel in) { - kind = (KindEnum)in.readValue(null); - } - - public int describeContents() { - return 0; - } - - public static final Parcelable.Creator CREATOR = new Parcelable.Creator() { - public BigCatAllOf createFromParcel(Parcel in) { - return new BigCatAllOf(in); - } - public BigCatAllOf[] newArray(int size) { - return new BigCatAllOf[size]; - } - }; - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("kind"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to BigCatAllOf - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!BigCatAllOf.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in BigCatAllOf is not found in the empty JSON string", BigCatAllOf.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!BigCatAllOf.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `BigCatAllOf` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("kind") != null && !jsonObj.get("kind").isJsonNull()) && !jsonObj.get("kind").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `kind` to be a primitive type in the JSON string but got `%s`", jsonObj.get("kind").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!BigCatAllOf.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'BigCatAllOf' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(BigCatAllOf.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, BigCatAllOf value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public BigCatAllOf read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of BigCatAllOf given an JSON string - * - * @param jsonString JSON string - * @return An instance of BigCatAllOf - * @throws IOException if the JSON string is invalid with respect to BigCatAllOf - */ - public static BigCatAllOf fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, BigCatAllOf.class); - } - - /** - * Convert an instance of BigCatAllOf to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/CatAllOf.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/CatAllOf.java deleted file mode 100644 index 4324c388795..00000000000 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/CatAllOf.java +++ /dev/null @@ -1,228 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import android.os.Parcelable; -import android.os.Parcel; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CatAllOf - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CatAllOf implements Parcelable { - public static final String SERIALIZED_NAME_DECLAWED = "declawed"; - @SerializedName(SERIALIZED_NAME_DECLAWED) - private Boolean declawed; - - public CatAllOf() { - } - - public CatAllOf declawed(Boolean declawed) { - - this.declawed = declawed; - return this; - } - - /** - * Get declawed - * @return declawed - **/ - @javax.annotation.Nullable - public Boolean getDeclawed() { - return declawed; - } - - - public void setDeclawed(Boolean declawed) { - this.declawed = declawed; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CatAllOf catAllOf = (CatAllOf) o; - return Objects.equals(this.declawed, catAllOf.declawed); - } - - @Override - public int hashCode() { - return Objects.hash(declawed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CatAllOf {\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public void writeToParcel(Parcel out, int flags) { - out.writeValue(declawed); - } - - CatAllOf(Parcel in) { - declawed = (Boolean)in.readValue(null); - } - - public int describeContents() { - return 0; - } - - public static final Parcelable.Creator CREATOR = new Parcelable.Creator() { - public CatAllOf createFromParcel(Parcel in) { - return new CatAllOf(in); - } - public CatAllOf[] newArray(int size) { - return new CatAllOf[size]; - } - }; - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("declawed"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CatAllOf - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CatAllOf.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CatAllOf is not found in the empty JSON string", CatAllOf.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!CatAllOf.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CatAllOf` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CatAllOf.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CatAllOf' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CatAllOf.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CatAllOf value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CatAllOf read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CatAllOf given an JSON string - * - * @param jsonString JSON string - * @return An instance of CatAllOf - * @throws IOException if the JSON string is invalid with respect to CatAllOf - */ - public static CatAllOf fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CatAllOf.class); - } - - /** - * Convert an instance of CatAllOf to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/DogAllOf.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/DogAllOf.java deleted file mode 100644 index 55a1c6a6df0..00000000000 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/model/DogAllOf.java +++ /dev/null @@ -1,231 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import android.os.Parcelable; -import android.os.Parcel; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * DogAllOf - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DogAllOf implements Parcelable { - public static final String SERIALIZED_NAME_BREED = "breed"; - @SerializedName(SERIALIZED_NAME_BREED) - private String breed; - - public DogAllOf() { - } - - public DogAllOf breed(String breed) { - - this.breed = breed; - return this; - } - - /** - * Get breed - * @return breed - **/ - @javax.annotation.Nullable - public String getBreed() { - return breed; - } - - - public void setBreed(String breed) { - this.breed = breed; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DogAllOf dogAllOf = (DogAllOf) o; - return Objects.equals(this.breed, dogAllOf.breed); - } - - @Override - public int hashCode() { - return Objects.hash(breed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DogAllOf {\n"); - sb.append(" breed: ").append(toIndentedString(breed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public void writeToParcel(Parcel out, int flags) { - out.writeValue(breed); - } - - DogAllOf(Parcel in) { - breed = (String)in.readValue(null); - } - - public int describeContents() { - return 0; - } - - public static final Parcelable.Creator CREATOR = new Parcelable.Creator() { - public DogAllOf createFromParcel(Parcel in) { - return new DogAllOf(in); - } - public DogAllOf[] newArray(int size) { - return new DogAllOf[size]; - } - }; - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("breed"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to DogAllOf - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DogAllOf.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in DogAllOf is not found in the empty JSON string", DogAllOf.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!DogAllOf.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `DogAllOf` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("breed") != null && !jsonObj.get("breed").isJsonNull()) && !jsonObj.get("breed").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `breed` to be a primitive type in the JSON string but got `%s`", jsonObj.get("breed").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DogAllOf.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DogAllOf' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(DogAllOf.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, DogAllOf value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public DogAllOf read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of DogAllOf given an JSON string - * - * @param jsonString JSON string - * @return An instance of DogAllOf - * @throws IOException if the JSON string is invalid with respect to DogAllOf - */ - public static DogAllOf fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DogAllOf.class); - } - - /** - * Convert an instance of DogAllOf to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/org/openapitools/client/model/BigCatAllOfTest.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/org/openapitools/client/model/BigCatAllOfTest.java deleted file mode 100644 index f7f725106d1..00000000000 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/org/openapitools/client/model/BigCatAllOfTest.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for BigCatAllOf - */ -public class BigCatAllOfTest { - private final BigCatAllOf model = new BigCatAllOf(); - - /** - * Model tests for BigCatAllOf - */ - @Test - public void testBigCatAllOf() { - // TODO: test BigCatAllOf - } - - /** - * Test the property 'kind' - */ - @Test - public void kindTest() { - // TODO: test kind - } - -} diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/org/openapitools/client/model/BigCatTest.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/org/openapitools/client/model/BigCatTest.java index 0cb50249725..e2f41cc959c 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/org/openapitools/client/model/BigCatTest.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/org/openapitools/client/model/BigCatTest.java @@ -18,15 +18,10 @@ import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; -import org.openapitools.client.model.BigCatAllOf; import org.openapitools.client.model.Cat; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Model tests for BigCat diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/org/openapitools/client/model/CatAllOfTest.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/org/openapitools/client/model/CatAllOfTest.java deleted file mode 100644 index 384ab21b773..00000000000 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/org/openapitools/client/model/CatAllOfTest.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for CatAllOf - */ -public class CatAllOfTest { - private final CatAllOf model = new CatAllOf(); - - /** - * Model tests for CatAllOf - */ - @Test - public void testCatAllOf() { - // TODO: test CatAllOf - } - - /** - * Test the property 'declawed' - */ - @Test - public void declawedTest() { - // TODO: test declawed - } - -} diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/org/openapitools/client/model/DogAllOfTest.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/org/openapitools/client/model/DogAllOfTest.java deleted file mode 100644 index 0d695b15a63..00000000000 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/org/openapitools/client/model/DogAllOfTest.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for DogAllOf - */ -public class DogAllOfTest { - private final DogAllOf model = new DogAllOf(); - - /** - * Model tests for DogAllOf - */ - @Test - public void testDogAllOf() { - // TODO: test DogAllOf - } - - /** - * Test the property 'breed' - */ - @Test - public void breedTest() { - // TODO: test breed - } - -} diff --git a/samples/client/petstore/java/okhttp-gson/.openapi-generator/FILES b/samples/client/petstore/java/okhttp-gson/.openapi-generator/FILES index 74fd5c044a7..978674eab23 100644 --- a/samples/client/petstore/java/okhttp-gson/.openapi-generator/FILES +++ b/samples/client/petstore/java/okhttp-gson/.openapi-generator/FILES @@ -13,8 +13,6 @@ docs/AppleReq.md docs/ArrayOfArrayOfNumberOnly.md docs/ArrayOfInlineAllOf.md docs/ArrayOfInlineAllOfArrayAllofDogPropertyInner.md -docs/ArrayOfInlineAllOfArrayAllofDogPropertyInnerAllOf.md -docs/ArrayOfInlineAllOfArrayAllofDogPropertyInnerAllOf1.md docs/ArrayOfNumberOnly.md docs/ArrayTest.md docs/Banana.md @@ -22,7 +20,6 @@ docs/BananaReq.md docs/BasquePig.md docs/Capitalization.md docs/Cat.md -docs/CatAllOf.md docs/Category.md docs/ClassModel.md docs/Client.md @@ -31,7 +28,6 @@ docs/DanishPig.md docs/DefaultApi.md docs/DeprecatedObject.md docs/Dog.md -docs/DogAllOf.md docs/Drawing.md docs/EnumArrays.md docs/EnumClass.md @@ -137,8 +133,6 @@ src/main/java/org/openapitools/client/model/AppleReq.java src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java src/main/java/org/openapitools/client/model/ArrayOfInlineAllOf.java src/main/java/org/openapitools/client/model/ArrayOfInlineAllOfArrayAllofDogPropertyInner.java -src/main/java/org/openapitools/client/model/ArrayOfInlineAllOfArrayAllofDogPropertyInnerAllOf.java -src/main/java/org/openapitools/client/model/ArrayOfInlineAllOfArrayAllofDogPropertyInnerAllOf1.java src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java src/main/java/org/openapitools/client/model/ArrayTest.java src/main/java/org/openapitools/client/model/Banana.java @@ -146,7 +140,6 @@ src/main/java/org/openapitools/client/model/BananaReq.java src/main/java/org/openapitools/client/model/BasquePig.java src/main/java/org/openapitools/client/model/Capitalization.java src/main/java/org/openapitools/client/model/Cat.java -src/main/java/org/openapitools/client/model/CatAllOf.java src/main/java/org/openapitools/client/model/Category.java src/main/java/org/openapitools/client/model/ClassModel.java src/main/java/org/openapitools/client/model/Client.java @@ -154,7 +147,6 @@ src/main/java/org/openapitools/client/model/ComplexQuadrilateral.java src/main/java/org/openapitools/client/model/DanishPig.java src/main/java/org/openapitools/client/model/DeprecatedObject.java src/main/java/org/openapitools/client/model/Dog.java -src/main/java/org/openapitools/client/model/DogAllOf.java src/main/java/org/openapitools/client/model/Drawing.java src/main/java/org/openapitools/client/model/EnumArrays.java src/main/java/org/openapitools/client/model/EnumClass.java diff --git a/samples/client/petstore/java/okhttp-gson/README.md b/samples/client/petstore/java/okhttp-gson/README.md index 27613fe7b2c..4d763ed26ce 100644 --- a/samples/client/petstore/java/okhttp-gson/README.md +++ b/samples/client/petstore/java/okhttp-gson/README.md @@ -163,8 +163,6 @@ Class | Method | HTTP request | Description - [ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md) - [ArrayOfInlineAllOf](docs/ArrayOfInlineAllOf.md) - [ArrayOfInlineAllOfArrayAllofDogPropertyInner](docs/ArrayOfInlineAllOfArrayAllofDogPropertyInner.md) - - [ArrayOfInlineAllOfArrayAllofDogPropertyInnerAllOf](docs/ArrayOfInlineAllOfArrayAllofDogPropertyInnerAllOf.md) - - [ArrayOfInlineAllOfArrayAllofDogPropertyInnerAllOf1](docs/ArrayOfInlineAllOfArrayAllofDogPropertyInnerAllOf1.md) - [ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md) - [ArrayTest](docs/ArrayTest.md) - [Banana](docs/Banana.md) @@ -172,7 +170,6 @@ Class | Method | HTTP request | Description - [BasquePig](docs/BasquePig.md) - [Capitalization](docs/Capitalization.md) - [Cat](docs/Cat.md) - - [CatAllOf](docs/CatAllOf.md) - [Category](docs/Category.md) - [ClassModel](docs/ClassModel.md) - [Client](docs/Client.md) @@ -180,7 +177,6 @@ Class | Method | HTTP request | Description - [DanishPig](docs/DanishPig.md) - [DeprecatedObject](docs/DeprecatedObject.md) - [Dog](docs/Dog.md) - - [DogAllOf](docs/DogAllOf.md) - [Drawing](docs/Drawing.md) - [EnumArrays](docs/EnumArrays.md) - [EnumClass](docs/EnumClass.md) diff --git a/samples/client/petstore/java/okhttp-gson/api/openapi.yaml b/samples/client/petstore/java/okhttp-gson/api/openapi.yaml index a879895762c..191c6f2423f 100644 --- a/samples/client/petstore/java/okhttp-gson/api/openapi.yaml +++ b/samples/client/petstore/java/okhttp-gson/api/openapi.yaml @@ -1412,12 +1412,18 @@ components: Dog: allOf: - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Dog_allOf' + - properties: + breed: + type: string + type: object Cat: allOf: - $ref: '#/components/schemas/Animal' - $ref: '#/components/schemas/Address' - - $ref: '#/components/schemas/Cat_allOf' + - properties: + declawed: + type: boolean + type: object Address: additionalProperties: type: integer @@ -2345,32 +2351,16 @@ components: required: - requiredFile type: object - Dog_allOf: - properties: - breed: - type: string - type: object - example: null - Cat_allOf: - properties: - declawed: - type: boolean - type: object - example: null - ArrayOfInlineAllOf_array_allof_dog_property_inner_allOf: - properties: - breed: - type: string - type: object - ArrayOfInlineAllOf_array_allof_dog_property_inner_allOf_1: - properties: - color: - type: string - type: object ArrayOfInlineAllOf_array_allof_dog_property_inner: allOf: - - $ref: '#/components/schemas/ArrayOfInlineAllOf_array_allof_dog_property_inner_allOf' - - $ref: '#/components/schemas/ArrayOfInlineAllOf_array_allof_dog_property_inner_allOf_1' + - properties: + breed: + type: string + type: object + - properties: + color: + type: string + type: object securitySchemes: petstore_auth: flows: diff --git a/samples/client/petstore/java/okhttp-gson/docs/ArrayOfInlineAllOfArrayAllofDogPropertyInnerAllOf.md b/samples/client/petstore/java/okhttp-gson/docs/ArrayOfInlineAllOfArrayAllofDogPropertyInnerAllOf.md deleted file mode 100644 index a30fc63ecf0..00000000000 --- a/samples/client/petstore/java/okhttp-gson/docs/ArrayOfInlineAllOfArrayAllofDogPropertyInnerAllOf.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# ArrayOfInlineAllOfArrayAllofDogPropertyInnerAllOf - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**breed** | **String** | | [optional] | - - - diff --git a/samples/client/petstore/java/okhttp-gson/docs/ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf.md b/samples/client/petstore/java/okhttp-gson/docs/ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf.md deleted file mode 100644 index bddcc0b3b30..00000000000 --- a/samples/client/petstore/java/okhttp-gson/docs/ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# ArrayOfInlineAllOfArrayAllofDogPropertyItemsAllOf - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**color** | **String** | | [optional] | - - - diff --git a/samples/client/petstore/java/okhttp-gson/docs/BigCatAllOf.md b/samples/client/petstore/java/okhttp-gson/docs/BigCatAllOf.md deleted file mode 100644 index 2bcace910ec..00000000000 --- a/samples/client/petstore/java/okhttp-gson/docs/BigCatAllOf.md +++ /dev/null @@ -1,24 +0,0 @@ - - -# BigCatAllOf - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**kind** | [**KindEnum**](#KindEnum) | | [optional] - - - -## Enum: KindEnum - -Name | Value ----- | ----- -LIONS | "lions" -TIGERS | "tigers" -LEOPARDS | "leopards" -JAGUARS | "jaguars" - - - diff --git a/samples/client/petstore/java/okhttp-gson/docs/CatAllOf.md b/samples/client/petstore/java/okhttp-gson/docs/CatAllOf.md deleted file mode 100644 index 926bc0abd78..00000000000 --- a/samples/client/petstore/java/okhttp-gson/docs/CatAllOf.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# CatAllOf - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**declawed** | **Boolean** | | [optional] | - - - diff --git a/samples/client/petstore/java/okhttp-gson/docs/ChildCatAllOf.md b/samples/client/petstore/java/okhttp-gson/docs/ChildCatAllOf.md deleted file mode 100644 index e7ace5e06bf..00000000000 --- a/samples/client/petstore/java/okhttp-gson/docs/ChildCatAllOf.md +++ /dev/null @@ -1,22 +0,0 @@ - - -# ChildCatAllOf - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **String** | | [optional] -**petType** | [**PetTypeEnum**](#PetTypeEnum) | | [optional] - - - -## Enum: PetTypeEnum - -Name | Value ----- | ----- -CHILDCAT | "ChildCat" - - - diff --git a/samples/client/petstore/java/okhttp-gson/docs/DogAllOf.md b/samples/client/petstore/java/okhttp-gson/docs/DogAllOf.md deleted file mode 100644 index d4e4ea0d548..00000000000 --- a/samples/client/petstore/java/okhttp-gson/docs/DogAllOf.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# DogAllOf - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**breed** | **String** | | [optional] | - - - diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/JSON.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/JSON.java index 00b9ca5ddca..f6df8fd08c5 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/JSON.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/JSON.java @@ -235,8 +235,6 @@ public class JSON { gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ArrayOfArrayOfNumberOnly.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ArrayOfInlineAllOf.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ArrayOfInlineAllOfArrayAllofDogPropertyInner.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ArrayOfInlineAllOfArrayAllofDogPropertyInnerAllOf.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ArrayOfInlineAllOfArrayAllofDogPropertyInnerAllOf1.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ArrayOfNumberOnly.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ArrayTest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Banana.CustomTypeAdapterFactory()); @@ -244,7 +242,6 @@ public class JSON { gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.BasquePig.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Capitalization.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Cat.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CatAllOf.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Category.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ClassModel.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Client.CustomTypeAdapterFactory()); @@ -252,7 +249,6 @@ public class JSON { gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.DanishPig.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.DeprecatedObject.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Dog.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.DogAllOf.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Drawing.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.EnumArrays.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.EnumStringDiscriminator.CustomTypeAdapterFactory()); diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfInlineAllOfArrayAllofDogPropertyInnerAllOf.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfInlineAllOfArrayAllofDogPropertyInnerAllOf.java deleted file mode 100644 index 51f4c83019d..00000000000 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfInlineAllOfArrayAllofDogPropertyInnerAllOf.java +++ /dev/null @@ -1,283 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * ArrayOfInlineAllOfArrayAllofDogPropertyInnerAllOf - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ArrayOfInlineAllOfArrayAllofDogPropertyInnerAllOf { - public static final String SERIALIZED_NAME_BREED = "breed"; - @SerializedName(SERIALIZED_NAME_BREED) - private String breed; - - public ArrayOfInlineAllOfArrayAllofDogPropertyInnerAllOf() { - } - - public ArrayOfInlineAllOfArrayAllofDogPropertyInnerAllOf breed(String breed) { - - this.breed = breed; - return this; - } - - /** - * Get breed - * @return breed - **/ - @javax.annotation.Nullable - public String getBreed() { - return breed; - } - - - public void setBreed(String breed) { - this.breed = breed; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the ArrayOfInlineAllOfArrayAllofDogPropertyInnerAllOf instance itself - */ - public ArrayOfInlineAllOfArrayAllofDogPropertyInnerAllOf putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ArrayOfInlineAllOfArrayAllofDogPropertyInnerAllOf arrayOfInlineAllOfArrayAllofDogPropertyInnerAllOf = (ArrayOfInlineAllOfArrayAllofDogPropertyInnerAllOf) o; - return Objects.equals(this.breed, arrayOfInlineAllOfArrayAllofDogPropertyInnerAllOf.breed)&& - Objects.equals(this.additionalProperties, arrayOfInlineAllOfArrayAllofDogPropertyInnerAllOf.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(breed, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ArrayOfInlineAllOfArrayAllofDogPropertyInnerAllOf {\n"); - sb.append(" breed: ").append(toIndentedString(breed)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("breed"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ArrayOfInlineAllOfArrayAllofDogPropertyInnerAllOf - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ArrayOfInlineAllOfArrayAllofDogPropertyInnerAllOf.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ArrayOfInlineAllOfArrayAllofDogPropertyInnerAllOf is not found in the empty JSON string", ArrayOfInlineAllOfArrayAllofDogPropertyInnerAllOf.openapiRequiredFields.toString())); - } - } - if ((jsonObj.get("breed") != null && !jsonObj.get("breed").isJsonNull()) && !jsonObj.get("breed").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `breed` to be a primitive type in the JSON string but got `%s`", jsonObj.get("breed").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ArrayOfInlineAllOfArrayAllofDogPropertyInnerAllOf.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ArrayOfInlineAllOfArrayAllofDogPropertyInnerAllOf' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ArrayOfInlineAllOfArrayAllofDogPropertyInnerAllOf.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ArrayOfInlineAllOfArrayAllofDogPropertyInnerAllOf value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public ArrayOfInlineAllOfArrayAllofDogPropertyInnerAllOf read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - ArrayOfInlineAllOfArrayAllofDogPropertyInnerAllOf instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ArrayOfInlineAllOfArrayAllofDogPropertyInnerAllOf given an JSON string - * - * @param jsonString JSON string - * @return An instance of ArrayOfInlineAllOfArrayAllofDogPropertyInnerAllOf - * @throws IOException if the JSON string is invalid with respect to ArrayOfInlineAllOfArrayAllofDogPropertyInnerAllOf - */ - public static ArrayOfInlineAllOfArrayAllofDogPropertyInnerAllOf fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ArrayOfInlineAllOfArrayAllofDogPropertyInnerAllOf.class); - } - - /** - * Convert an instance of ArrayOfInlineAllOfArrayAllofDogPropertyInnerAllOf to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/CatAllOf.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/CatAllOf.java deleted file mode 100644 index a19afa6c13a..00000000000 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/CatAllOf.java +++ /dev/null @@ -1,280 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * CatAllOf - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CatAllOf { - public static final String SERIALIZED_NAME_DECLAWED = "declawed"; - @SerializedName(SERIALIZED_NAME_DECLAWED) - private Boolean declawed; - - public CatAllOf() { - } - - public CatAllOf declawed(Boolean declawed) { - - this.declawed = declawed; - return this; - } - - /** - * Get declawed - * @return declawed - **/ - @javax.annotation.Nullable - public Boolean getDeclawed() { - return declawed; - } - - - public void setDeclawed(Boolean declawed) { - this.declawed = declawed; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the CatAllOf instance itself - */ - public CatAllOf putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CatAllOf catAllOf = (CatAllOf) o; - return Objects.equals(this.declawed, catAllOf.declawed)&& - Objects.equals(this.additionalProperties, catAllOf.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(declawed, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CatAllOf {\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("declawed"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to CatAllOf - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!CatAllOf.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CatAllOf is not found in the empty JSON string", CatAllOf.openapiRequiredFields.toString())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CatAllOf.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CatAllOf' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CatAllOf.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CatAllOf value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public CatAllOf read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - CatAllOf instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CatAllOf given an JSON string - * - * @param jsonString JSON string - * @return An instance of CatAllOf - * @throws IOException if the JSON string is invalid with respect to CatAllOf - */ - public static CatAllOf fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CatAllOf.class); - } - - /** - * Convert an instance of CatAllOf to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/DogAllOf.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/DogAllOf.java deleted file mode 100644 index 2fe5ef27f92..00000000000 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/DogAllOf.java +++ /dev/null @@ -1,283 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * DogAllOf - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DogAllOf { - public static final String SERIALIZED_NAME_BREED = "breed"; - @SerializedName(SERIALIZED_NAME_BREED) - private String breed; - - public DogAllOf() { - } - - public DogAllOf breed(String breed) { - - this.breed = breed; - return this; - } - - /** - * Get breed - * @return breed - **/ - @javax.annotation.Nullable - public String getBreed() { - return breed; - } - - - public void setBreed(String breed) { - this.breed = breed; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the DogAllOf instance itself - */ - public DogAllOf putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DogAllOf dogAllOf = (DogAllOf) o; - return Objects.equals(this.breed, dogAllOf.breed)&& - Objects.equals(this.additionalProperties, dogAllOf.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(breed, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DogAllOf {\n"); - sb.append(" breed: ").append(toIndentedString(breed)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("breed"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to DogAllOf - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!DogAllOf.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in DogAllOf is not found in the empty JSON string", DogAllOf.openapiRequiredFields.toString())); - } - } - if ((jsonObj.get("breed") != null && !jsonObj.get("breed").isJsonNull()) && !jsonObj.get("breed").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `breed` to be a primitive type in the JSON string but got `%s`", jsonObj.get("breed").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DogAllOf.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DogAllOf' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(DogAllOf.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, DogAllOf value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public DogAllOf read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - // store additional fields in the deserialized instance - DogAllOf instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of DogAllOf given an JSON string - * - * @param jsonString JSON string - * @return An instance of DogAllOf - * @throws IOException if the JSON string is invalid with respect to DogAllOf - */ - public static DogAllOf fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DogAllOf.class); - } - - /** - * Convert an instance of DogAllOf to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ArrayOfInlineAllOfArrayAllofDogPropertyInnerAllOfTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ArrayOfInlineAllOfArrayAllofDogPropertyInnerAllOfTest.java deleted file mode 100644 index 84a4cd08a6f..00000000000 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ArrayOfInlineAllOfArrayAllofDogPropertyInnerAllOfTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - - -/** - * Model tests for ArrayOfInlineAllOfArrayAllofDogPropertyInnerAllOf - */ -public class ArrayOfInlineAllOfArrayAllofDogPropertyInnerAllOfTest { - private final ArrayOfInlineAllOfArrayAllofDogPropertyInnerAllOf model = new ArrayOfInlineAllOfArrayAllofDogPropertyInnerAllOf(); - - /** - * Model tests for ArrayOfInlineAllOfArrayAllofDogPropertyInnerAllOf - */ - @Test - public void testArrayOfInlineAllOfArrayAllofDogPropertyInnerAllOf() { - // TODO: test ArrayOfInlineAllOfArrayAllofDogPropertyInnerAllOf - } - - /** - * Test the property 'breed' - */ - @Test - public void breedTest() { - // TODO: test breed - } - -} diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ArrayOfInlineAllOfTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ArrayOfInlineAllOfTest.java index c887d6b4bc3..c60f964a6c5 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ArrayOfInlineAllOfTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ArrayOfInlineAllOfTest.java @@ -25,7 +25,6 @@ import org.openapitools.client.model.ArrayOfInlineAllOfArrayAllofDogPropertyInne import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; - /** * Model tests for ArrayOfInlineAllOf */ diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/CatAllOfTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/CatAllOfTest.java deleted file mode 100644 index 2029405281a..00000000000 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/CatAllOfTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - - -/** - * Model tests for CatAllOf - */ -public class CatAllOfTest { - private final CatAllOf model = new CatAllOf(); - - /** - * Model tests for CatAllOf - */ - @Test - public void testCatAllOf() { - // TODO: test CatAllOf - } - - /** - * Test the property 'declawed' - */ - @Test - public void declawedTest() { - // TODO: test declawed - } - -} diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/DogAllOfTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/DogAllOfTest.java deleted file mode 100644 index 6f19a448823..00000000000 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/DogAllOfTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - - -/** - * Model tests for DogAllOf - */ -public class DogAllOfTest { - private final DogAllOf model = new DogAllOf(); - - /** - * Model tests for DogAllOf - */ - @Test - public void testDogAllOf() { - // TODO: test DogAllOf - } - - /** - * Test the property 'breed' - */ - @Test - public void breedTest() { - // TODO: test breed - } - -} diff --git a/samples/client/petstore/java/rest-assured-jackson/.openapi-generator/FILES b/samples/client/petstore/java/rest-assured-jackson/.openapi-generator/FILES index 420708916e9..64cd57d8760 100644 --- a/samples/client/petstore/java/rest-assured-jackson/.openapi-generator/FILES +++ b/samples/client/petstore/java/rest-assured-jackson/.openapi-generator/FILES @@ -19,15 +19,12 @@ docs/ArrayOfArrayOfNumberOnly.md docs/ArrayOfNumberOnly.md docs/ArrayTest.md docs/BigCat.md -docs/BigCatAllOf.md docs/Capitalization.md docs/Cat.md -docs/CatAllOf.md docs/Category.md docs/ClassModel.md docs/Client.md docs/Dog.md -docs/DogAllOf.md docs/EnumArrays.md docs/EnumClass.md docs/EnumTest.md @@ -95,15 +92,12 @@ src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java src/main/java/org/openapitools/client/model/ArrayTest.java src/main/java/org/openapitools/client/model/BigCat.java -src/main/java/org/openapitools/client/model/BigCatAllOf.java src/main/java/org/openapitools/client/model/Capitalization.java src/main/java/org/openapitools/client/model/Cat.java -src/main/java/org/openapitools/client/model/CatAllOf.java src/main/java/org/openapitools/client/model/Category.java src/main/java/org/openapitools/client/model/ClassModel.java src/main/java/org/openapitools/client/model/Client.java src/main/java/org/openapitools/client/model/Dog.java -src/main/java/org/openapitools/client/model/DogAllOf.java src/main/java/org/openapitools/client/model/EnumArrays.java src/main/java/org/openapitools/client/model/EnumClass.java src/main/java/org/openapitools/client/model/EnumTest.java diff --git a/samples/client/petstore/java/rest-assured-jackson/api/openapi.yaml b/samples/client/petstore/java/rest-assured-jackson/api/openapi.yaml index e7e17402f6f..dbf370f445d 100644 --- a/samples/client/petstore/java/rest-assured-jackson/api/openapi.yaml +++ b/samples/client/petstore/java/rest-assured-jackson/api/openapi.yaml @@ -1364,15 +1364,29 @@ components: Dog: allOf: - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Dog_allOf' + - properties: + breed: + type: string + type: object Cat: allOf: - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Cat_allOf' + - properties: + declawed: + type: boolean + type: object BigCat: allOf: - $ref: '#/components/schemas/Cat' - - $ref: '#/components/schemas/BigCat_allOf' + - properties: + kind: + enum: + - lions + - tigers + - leopards + - jaguars + type: string + type: object Animal: discriminator: propertyName: className @@ -2165,29 +2179,6 @@ components: required: - requiredFile type: object - Dog_allOf: - properties: - breed: - type: string - type: object - example: null - Cat_allOf: - properties: - declawed: - type: boolean - type: object - example: null - BigCat_allOf: - properties: - kind: - enum: - - lions - - tigers - - leopards - - jaguars - type: string - type: object - example: null securitySchemes: petstore_auth: flows: diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/BigCatAllOf.md b/samples/client/petstore/java/rest-assured-jackson/docs/BigCatAllOf.md deleted file mode 100644 index 2bee213a607..00000000000 --- a/samples/client/petstore/java/rest-assured-jackson/docs/BigCatAllOf.md +++ /dev/null @@ -1,24 +0,0 @@ - - -# BigCatAllOf - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**kind** | [**KindEnum**](#KindEnum) | | [optional] | - - - -## Enum: KindEnum - -| Name | Value | -|---- | -----| -| LIONS | "lions" | -| TIGERS | "tigers" | -| LEOPARDS | "leopards" | -| JAGUARS | "jaguars" | - - - diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/CatAllOf.md b/samples/client/petstore/java/rest-assured-jackson/docs/CatAllOf.md deleted file mode 100644 index 926bc0abd78..00000000000 --- a/samples/client/petstore/java/rest-assured-jackson/docs/CatAllOf.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# CatAllOf - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**declawed** | **Boolean** | | [optional] | - - - diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/DogAllOf.md b/samples/client/petstore/java/rest-assured-jackson/docs/DogAllOf.md deleted file mode 100644 index d4e4ea0d548..00000000000 --- a/samples/client/petstore/java/rest-assured-jackson/docs/DogAllOf.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# DogAllOf - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**breed** | **String** | | [optional] | - - - diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/BigCatAllOf.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/BigCatAllOf.java deleted file mode 100644 index 591388b6c28..00000000000 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/BigCatAllOf.java +++ /dev/null @@ -1,147 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeName; -import javax.validation.constraints.*; -import javax.validation.Valid; -import org.hibernate.validator.constraints.*; - -/** - * BigCatAllOf - */ -@JsonPropertyOrder({ - BigCatAllOf.JSON_PROPERTY_KIND -}) -@JsonTypeName("BigCat_allOf") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class BigCatAllOf { - /** - * Gets or Sets kind - */ - public enum KindEnum { - LIONS("lions"), - - TIGERS("tigers"), - - LEOPARDS("leopards"), - - JAGUARS("jaguars"); - - private String value; - - KindEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static KindEnum fromValue(String value) { - for (KindEnum b : KindEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - public static final String JSON_PROPERTY_KIND = "kind"; - private KindEnum kind; - - public BigCatAllOf() { - } - - public BigCatAllOf kind(KindEnum kind) { - - this.kind = kind; - return this; - } - - /** - * Get kind - * @return kind - **/ - @javax.annotation.Nullable - - @JsonProperty(JSON_PROPERTY_KIND) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public KindEnum getKind() { - return kind; - } - - - @JsonProperty(JSON_PROPERTY_KIND) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setKind(KindEnum kind) { - this.kind = kind; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BigCatAllOf bigCatAllOf = (BigCatAllOf) o; - return Objects.equals(this.kind, bigCatAllOf.kind); - } - - @Override - public int hashCode() { - return Objects.hash(kind); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BigCatAllOf {\n"); - sb.append(" kind: ").append(toIndentedString(kind)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/CatAllOf.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/CatAllOf.java deleted file mode 100644 index 1c4b80b855c..00000000000 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/CatAllOf.java +++ /dev/null @@ -1,108 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeName; -import javax.validation.constraints.*; -import javax.validation.Valid; -import org.hibernate.validator.constraints.*; - -/** - * CatAllOf - */ -@JsonPropertyOrder({ - CatAllOf.JSON_PROPERTY_DECLAWED -}) -@JsonTypeName("Cat_allOf") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CatAllOf { - public static final String JSON_PROPERTY_DECLAWED = "declawed"; - private Boolean declawed; - - public CatAllOf() { - } - - public CatAllOf declawed(Boolean declawed) { - - this.declawed = declawed; - return this; - } - - /** - * Get declawed - * @return declawed - **/ - @javax.annotation.Nullable - - @JsonProperty(JSON_PROPERTY_DECLAWED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Boolean isDeclawed() { - return declawed; - } - - - @JsonProperty(JSON_PROPERTY_DECLAWED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDeclawed(Boolean declawed) { - this.declawed = declawed; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CatAllOf catAllOf = (CatAllOf) o; - return Objects.equals(this.declawed, catAllOf.declawed); - } - - @Override - public int hashCode() { - return Objects.hash(declawed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CatAllOf {\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/DogAllOf.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/DogAllOf.java deleted file mode 100644 index 8778fe82756..00000000000 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/model/DogAllOf.java +++ /dev/null @@ -1,108 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeName; -import javax.validation.constraints.*; -import javax.validation.Valid; -import org.hibernate.validator.constraints.*; - -/** - * DogAllOf - */ -@JsonPropertyOrder({ - DogAllOf.JSON_PROPERTY_BREED -}) -@JsonTypeName("Dog_allOf") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DogAllOf { - public static final String JSON_PROPERTY_BREED = "breed"; - private String breed; - - public DogAllOf() { - } - - public DogAllOf breed(String breed) { - - this.breed = breed; - return this; - } - - /** - * Get breed - * @return breed - **/ - @javax.annotation.Nullable - - @JsonProperty(JSON_PROPERTY_BREED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getBreed() { - return breed; - } - - - @JsonProperty(JSON_PROPERTY_BREED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setBreed(String breed) { - this.breed = breed; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DogAllOf dogAllOf = (DogAllOf) o; - return Objects.equals(this.breed, dogAllOf.breed); - } - - @Override - public int hashCode() { - return Objects.hash(breed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DogAllOf {\n"); - sb.append(" breed: ").append(toIndentedString(breed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/BigCatAllOfTest.java b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/BigCatAllOfTest.java deleted file mode 100644 index 8e291df45f1..00000000000 --- a/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/BigCatAllOfTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for BigCatAllOf - */ -public class BigCatAllOfTest { - private final BigCatAllOf model = new BigCatAllOf(); - - /** - * Model tests for BigCatAllOf - */ - @Test - public void testBigCatAllOf() { - // TODO: test BigCatAllOf - } - - /** - * Test the property 'kind' - */ - @Test - public void kindTest() { - // TODO: test kind - } - -} diff --git a/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/BigCatTest.java b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/BigCatTest.java index f6c4621c9ea..765bd150512 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/BigCatTest.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/BigCatTest.java @@ -26,7 +26,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for BigCat */ diff --git a/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/CatAllOfTest.java b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/CatAllOfTest.java deleted file mode 100644 index 269bdbe11b7..00000000000 --- a/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/CatAllOfTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for CatAllOf - */ -public class CatAllOfTest { - private final CatAllOf model = new CatAllOf(); - - /** - * Model tests for CatAllOf - */ - @Test - public void testCatAllOf() { - // TODO: test CatAllOf - } - - /** - * Test the property 'declawed' - */ - @Test - public void declawedTest() { - // TODO: test declawed - } - -} diff --git a/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/DogAllOfTest.java b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/DogAllOfTest.java deleted file mode 100644 index dfa91c25ec8..00000000000 --- a/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/model/DogAllOfTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for DogAllOf - */ -public class DogAllOfTest { - private final DogAllOf model = new DogAllOf(); - - /** - * Model tests for DogAllOf - */ - @Test - public void testDogAllOf() { - // TODO: test DogAllOf - } - - /** - * Test the property 'breed' - */ - @Test - public void breedTest() { - // TODO: test breed - } - -} diff --git a/samples/client/petstore/java/rest-assured/.openapi-generator/FILES b/samples/client/petstore/java/rest-assured/.openapi-generator/FILES index 5839b8a8576..db6eccdeb21 100644 --- a/samples/client/petstore/java/rest-assured/.openapi-generator/FILES +++ b/samples/client/petstore/java/rest-assured/.openapi-generator/FILES @@ -19,15 +19,12 @@ docs/ArrayOfArrayOfNumberOnly.md docs/ArrayOfNumberOnly.md docs/ArrayTest.md docs/BigCat.md -docs/BigCatAllOf.md docs/Capitalization.md docs/Cat.md -docs/CatAllOf.md docs/Category.md docs/ClassModel.md docs/Client.md docs/Dog.md -docs/DogAllOf.md docs/EnumArrays.md docs/EnumClass.md docs/EnumTest.md @@ -95,15 +92,12 @@ src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java src/main/java/org/openapitools/client/model/ArrayTest.java src/main/java/org/openapitools/client/model/BigCat.java -src/main/java/org/openapitools/client/model/BigCatAllOf.java src/main/java/org/openapitools/client/model/Capitalization.java src/main/java/org/openapitools/client/model/Cat.java -src/main/java/org/openapitools/client/model/CatAllOf.java src/main/java/org/openapitools/client/model/Category.java src/main/java/org/openapitools/client/model/ClassModel.java src/main/java/org/openapitools/client/model/Client.java src/main/java/org/openapitools/client/model/Dog.java -src/main/java/org/openapitools/client/model/DogAllOf.java src/main/java/org/openapitools/client/model/EnumArrays.java src/main/java/org/openapitools/client/model/EnumClass.java src/main/java/org/openapitools/client/model/EnumTest.java diff --git a/samples/client/petstore/java/rest-assured/api/openapi.yaml b/samples/client/petstore/java/rest-assured/api/openapi.yaml index e7e17402f6f..dbf370f445d 100644 --- a/samples/client/petstore/java/rest-assured/api/openapi.yaml +++ b/samples/client/petstore/java/rest-assured/api/openapi.yaml @@ -1364,15 +1364,29 @@ components: Dog: allOf: - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Dog_allOf' + - properties: + breed: + type: string + type: object Cat: allOf: - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Cat_allOf' + - properties: + declawed: + type: boolean + type: object BigCat: allOf: - $ref: '#/components/schemas/Cat' - - $ref: '#/components/schemas/BigCat_allOf' + - properties: + kind: + enum: + - lions + - tigers + - leopards + - jaguars + type: string + type: object Animal: discriminator: propertyName: className @@ -2165,29 +2179,6 @@ components: required: - requiredFile type: object - Dog_allOf: - properties: - breed: - type: string - type: object - example: null - Cat_allOf: - properties: - declawed: - type: boolean - type: object - example: null - BigCat_allOf: - properties: - kind: - enum: - - lions - - tigers - - leopards - - jaguars - type: string - type: object - example: null securitySchemes: petstore_auth: flows: diff --git a/samples/client/petstore/java/rest-assured/docs/BigCatAllOf.md b/samples/client/petstore/java/rest-assured/docs/BigCatAllOf.md deleted file mode 100644 index 2bee213a607..00000000000 --- a/samples/client/petstore/java/rest-assured/docs/BigCatAllOf.md +++ /dev/null @@ -1,24 +0,0 @@ - - -# BigCatAllOf - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**kind** | [**KindEnum**](#KindEnum) | | [optional] | - - - -## Enum: KindEnum - -| Name | Value | -|---- | -----| -| LIONS | "lions" | -| TIGERS | "tigers" | -| LEOPARDS | "leopards" | -| JAGUARS | "jaguars" | - - - diff --git a/samples/client/petstore/java/rest-assured/docs/CatAllOf.md b/samples/client/petstore/java/rest-assured/docs/CatAllOf.md deleted file mode 100644 index 926bc0abd78..00000000000 --- a/samples/client/petstore/java/rest-assured/docs/CatAllOf.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# CatAllOf - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**declawed** | **Boolean** | | [optional] | - - - diff --git a/samples/client/petstore/java/rest-assured/docs/DogAllOf.md b/samples/client/petstore/java/rest-assured/docs/DogAllOf.md deleted file mode 100644 index d4e4ea0d548..00000000000 --- a/samples/client/petstore/java/rest-assured/docs/DogAllOf.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# DogAllOf - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**breed** | **String** | | [optional] | - - - diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/BigCatAllOf.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/BigCatAllOf.java deleted file mode 100644 index 587609a35dd..00000000000 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/BigCatAllOf.java +++ /dev/null @@ -1,151 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import javax.validation.constraints.*; -import javax.validation.Valid; -import org.hibernate.validator.constraints.*; - -/** - * BigCatAllOf - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class BigCatAllOf { - /** - * Gets or Sets kind - */ - @JsonAdapter(KindEnum.Adapter.class) - public enum KindEnum { - LIONS("lions"), - - TIGERS("tigers"), - - LEOPARDS("leopards"), - - JAGUARS("jaguars"); - - private String value; - - KindEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static KindEnum fromValue(String value) { - for (KindEnum b : KindEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final KindEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public KindEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return KindEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_KIND = "kind"; - @SerializedName(SERIALIZED_NAME_KIND) - private KindEnum kind; - - public BigCatAllOf() { - } - - public BigCatAllOf kind(KindEnum kind) { - - this.kind = kind; - return this; - } - - /** - * Get kind - * @return kind - **/ - @javax.annotation.Nullable - - - public KindEnum getKind() { - return kind; - } - - - public void setKind(KindEnum kind) { - this.kind = kind; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BigCatAllOf bigCatAllOf = (BigCatAllOf) o; - return Objects.equals(this.kind, bigCatAllOf.kind); - } - - @Override - public int hashCode() { - return Objects.hash(kind); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BigCatAllOf {\n"); - sb.append(" kind: ").append(toIndentedString(kind)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/CatAllOf.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/CatAllOf.java deleted file mode 100644 index 57f23c08af1..00000000000 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/CatAllOf.java +++ /dev/null @@ -1,100 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import javax.validation.constraints.*; -import javax.validation.Valid; -import org.hibernate.validator.constraints.*; - -/** - * CatAllOf - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CatAllOf { - public static final String SERIALIZED_NAME_DECLAWED = "declawed"; - @SerializedName(SERIALIZED_NAME_DECLAWED) - private Boolean declawed; - - public CatAllOf() { - } - - public CatAllOf declawed(Boolean declawed) { - - this.declawed = declawed; - return this; - } - - /** - * Get declawed - * @return declawed - **/ - @javax.annotation.Nullable - - - public Boolean isDeclawed() { - return declawed; - } - - - public void setDeclawed(Boolean declawed) { - this.declawed = declawed; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CatAllOf catAllOf = (CatAllOf) o; - return Objects.equals(this.declawed, catAllOf.declawed); - } - - @Override - public int hashCode() { - return Objects.hash(declawed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CatAllOf {\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/DogAllOf.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/DogAllOf.java deleted file mode 100644 index 5f25bae6c90..00000000000 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/model/DogAllOf.java +++ /dev/null @@ -1,100 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import javax.validation.constraints.*; -import javax.validation.Valid; -import org.hibernate.validator.constraints.*; - -/** - * DogAllOf - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DogAllOf { - public static final String SERIALIZED_NAME_BREED = "breed"; - @SerializedName(SERIALIZED_NAME_BREED) - private String breed; - - public DogAllOf() { - } - - public DogAllOf breed(String breed) { - - this.breed = breed; - return this; - } - - /** - * Get breed - * @return breed - **/ - @javax.annotation.Nullable - - - public String getBreed() { - return breed; - } - - - public void setBreed(String breed) { - this.breed = breed; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DogAllOf dogAllOf = (DogAllOf) o; - return Objects.equals(this.breed, dogAllOf.breed); - } - - @Override - public int hashCode() { - return Objects.hash(breed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DogAllOf {\n"); - sb.append(" breed: ").append(toIndentedString(breed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/BigCatAllOfTest.java b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/BigCatAllOfTest.java deleted file mode 100644 index 0a4a6bbde97..00000000000 --- a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/BigCatAllOfTest.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for BigCatAllOf - */ -public class BigCatAllOfTest { - private final BigCatAllOf model = new BigCatAllOf(); - - /** - * Model tests for BigCatAllOf - */ - @Test - public void testBigCatAllOf() { - // TODO: test BigCatAllOf - } - - /** - * Test the property 'kind' - */ - @Test - public void kindTest() { - // TODO: test kind - } - -} diff --git a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/BigCatTest.java b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/BigCatTest.java index 76b4f108abc..0949e1385d8 100644 --- a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/BigCatTest.java +++ b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/BigCatTest.java @@ -24,7 +24,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for BigCat */ diff --git a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/CatAllOfTest.java b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/CatAllOfTest.java deleted file mode 100644 index d9fc6647d75..00000000000 --- a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/CatAllOfTest.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for CatAllOf - */ -public class CatAllOfTest { - private final CatAllOf model = new CatAllOf(); - - /** - * Model tests for CatAllOf - */ - @Test - public void testCatAllOf() { - // TODO: test CatAllOf - } - - /** - * Test the property 'declawed' - */ - @Test - public void declawedTest() { - // TODO: test declawed - } - -} diff --git a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/DogAllOfTest.java b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/DogAllOfTest.java deleted file mode 100644 index e0a64356ca9..00000000000 --- a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/model/DogAllOfTest.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for DogAllOf - */ -public class DogAllOfTest { - private final DogAllOf model = new DogAllOf(); - - /** - * Model tests for DogAllOf - */ - @Test - public void testDogAllOf() { - // TODO: test DogAllOf - } - - /** - * Test the property 'breed' - */ - @Test - public void breedTest() { - // TODO: test breed - } - -} diff --git a/samples/client/petstore/java/resteasy/.openapi-generator/FILES b/samples/client/petstore/java/resteasy/.openapi-generator/FILES index 53a94697817..bcfdf41c52f 100644 --- a/samples/client/petstore/java/resteasy/.openapi-generator/FILES +++ b/samples/client/petstore/java/resteasy/.openapi-generator/FILES @@ -19,15 +19,12 @@ docs/ArrayOfArrayOfNumberOnly.md docs/ArrayOfNumberOnly.md docs/ArrayTest.md docs/BigCat.md -docs/BigCatAllOf.md docs/Capitalization.md docs/Cat.md -docs/CatAllOf.md docs/Category.md docs/ClassModel.md docs/Client.md docs/Dog.md -docs/DogAllOf.md docs/EnumArrays.md docs/EnumClass.md docs/EnumTest.md @@ -103,15 +100,12 @@ src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java src/main/java/org/openapitools/client/model/ArrayTest.java src/main/java/org/openapitools/client/model/BigCat.java -src/main/java/org/openapitools/client/model/BigCatAllOf.java src/main/java/org/openapitools/client/model/Capitalization.java src/main/java/org/openapitools/client/model/Cat.java -src/main/java/org/openapitools/client/model/CatAllOf.java src/main/java/org/openapitools/client/model/Category.java src/main/java/org/openapitools/client/model/ClassModel.java src/main/java/org/openapitools/client/model/Client.java src/main/java/org/openapitools/client/model/Dog.java -src/main/java/org/openapitools/client/model/DogAllOf.java src/main/java/org/openapitools/client/model/EnumArrays.java src/main/java/org/openapitools/client/model/EnumClass.java src/main/java/org/openapitools/client/model/EnumTest.java diff --git a/samples/client/petstore/java/resteasy/README.md b/samples/client/petstore/java/resteasy/README.md index 0c17abbcbcb..391c3ed4eeb 100644 --- a/samples/client/petstore/java/resteasy/README.md +++ b/samples/client/petstore/java/resteasy/README.md @@ -167,15 +167,12 @@ Class | Method | HTTP request | Description - [ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md) - [ArrayTest](docs/ArrayTest.md) - [BigCat](docs/BigCat.md) - - [BigCatAllOf](docs/BigCatAllOf.md) - [Capitalization](docs/Capitalization.md) - [Cat](docs/Cat.md) - - [CatAllOf](docs/CatAllOf.md) - [Category](docs/Category.md) - [ClassModel](docs/ClassModel.md) - [Client](docs/Client.md) - [Dog](docs/Dog.md) - - [DogAllOf](docs/DogAllOf.md) - [EnumArrays](docs/EnumArrays.md) - [EnumClass](docs/EnumClass.md) - [EnumTest](docs/EnumTest.md) diff --git a/samples/client/petstore/java/resteasy/api/openapi.yaml b/samples/client/petstore/java/resteasy/api/openapi.yaml index e7e17402f6f..dbf370f445d 100644 --- a/samples/client/petstore/java/resteasy/api/openapi.yaml +++ b/samples/client/petstore/java/resteasy/api/openapi.yaml @@ -1364,15 +1364,29 @@ components: Dog: allOf: - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Dog_allOf' + - properties: + breed: + type: string + type: object Cat: allOf: - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Cat_allOf' + - properties: + declawed: + type: boolean + type: object BigCat: allOf: - $ref: '#/components/schemas/Cat' - - $ref: '#/components/schemas/BigCat_allOf' + - properties: + kind: + enum: + - lions + - tigers + - leopards + - jaguars + type: string + type: object Animal: discriminator: propertyName: className @@ -2165,29 +2179,6 @@ components: required: - requiredFile type: object - Dog_allOf: - properties: - breed: - type: string - type: object - example: null - Cat_allOf: - properties: - declawed: - type: boolean - type: object - example: null - BigCat_allOf: - properties: - kind: - enum: - - lions - - tigers - - leopards - - jaguars - type: string - type: object - example: null securitySchemes: petstore_auth: flows: diff --git a/samples/client/petstore/java/resteasy/docs/BigCatAllOf.md b/samples/client/petstore/java/resteasy/docs/BigCatAllOf.md deleted file mode 100644 index 2bee213a607..00000000000 --- a/samples/client/petstore/java/resteasy/docs/BigCatAllOf.md +++ /dev/null @@ -1,24 +0,0 @@ - - -# BigCatAllOf - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**kind** | [**KindEnum**](#KindEnum) | | [optional] | - - - -## Enum: KindEnum - -| Name | Value | -|---- | -----| -| LIONS | "lions" | -| TIGERS | "tigers" | -| LEOPARDS | "leopards" | -| JAGUARS | "jaguars" | - - - diff --git a/samples/client/petstore/java/resteasy/docs/CatAllOf.md b/samples/client/petstore/java/resteasy/docs/CatAllOf.md deleted file mode 100644 index 926bc0abd78..00000000000 --- a/samples/client/petstore/java/resteasy/docs/CatAllOf.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# CatAllOf - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**declawed** | **Boolean** | | [optional] | - - - diff --git a/samples/client/petstore/java/resteasy/docs/DogAllOf.md b/samples/client/petstore/java/resteasy/docs/DogAllOf.md deleted file mode 100644 index d4e4ea0d548..00000000000 --- a/samples/client/petstore/java/resteasy/docs/DogAllOf.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# DogAllOf - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**breed** | **String** | | [optional] | - - - diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/BigCatAllOf.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/BigCatAllOf.java deleted file mode 100644 index e357e3111ca..00000000000 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/BigCatAllOf.java +++ /dev/null @@ -1,143 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** - * BigCatAllOf - */ -@JsonPropertyOrder({ - BigCatAllOf.JSON_PROPERTY_KIND -}) -@JsonTypeName("BigCat_allOf") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class BigCatAllOf { - /** - * Gets or Sets kind - */ - public enum KindEnum { - LIONS("lions"), - - TIGERS("tigers"), - - LEOPARDS("leopards"), - - JAGUARS("jaguars"); - - private String value; - - KindEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static KindEnum fromValue(String value) { - for (KindEnum b : KindEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - public static final String JSON_PROPERTY_KIND = "kind"; - private KindEnum kind; - - public BigCatAllOf() { - } - - public BigCatAllOf kind(KindEnum kind) { - - this.kind = kind; - return this; - } - - /** - * Get kind - * @return kind - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_KIND) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public KindEnum getKind() { - return kind; - } - - - @JsonProperty(JSON_PROPERTY_KIND) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setKind(KindEnum kind) { - this.kind = kind; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BigCatAllOf bigCatAllOf = (BigCatAllOf) o; - return Objects.equals(this.kind, bigCatAllOf.kind); - } - - @Override - public int hashCode() { - return Objects.hash(kind); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BigCatAllOf {\n"); - sb.append(" kind: ").append(toIndentedString(kind)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/CatAllOf.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/CatAllOf.java deleted file mode 100644 index 7c404d48482..00000000000 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/CatAllOf.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** - * CatAllOf - */ -@JsonPropertyOrder({ - CatAllOf.JSON_PROPERTY_DECLAWED -}) -@JsonTypeName("Cat_allOf") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CatAllOf { - public static final String JSON_PROPERTY_DECLAWED = "declawed"; - private Boolean declawed; - - public CatAllOf() { - } - - public CatAllOf declawed(Boolean declawed) { - - this.declawed = declawed; - return this; - } - - /** - * Get declawed - * @return declawed - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DECLAWED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Boolean getDeclawed() { - return declawed; - } - - - @JsonProperty(JSON_PROPERTY_DECLAWED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDeclawed(Boolean declawed) { - this.declawed = declawed; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CatAllOf catAllOf = (CatAllOf) o; - return Objects.equals(this.declawed, catAllOf.declawed); - } - - @Override - public int hashCode() { - return Objects.hash(declawed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CatAllOf {\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/DogAllOf.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/DogAllOf.java deleted file mode 100644 index 2978c34e2cc..00000000000 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/DogAllOf.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** - * DogAllOf - */ -@JsonPropertyOrder({ - DogAllOf.JSON_PROPERTY_BREED -}) -@JsonTypeName("Dog_allOf") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DogAllOf { - public static final String JSON_PROPERTY_BREED = "breed"; - private String breed; - - public DogAllOf() { - } - - public DogAllOf breed(String breed) { - - this.breed = breed; - return this; - } - - /** - * Get breed - * @return breed - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_BREED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getBreed() { - return breed; - } - - - @JsonProperty(JSON_PROPERTY_BREED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setBreed(String breed) { - this.breed = breed; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DogAllOf dogAllOf = (DogAllOf) o; - return Objects.equals(this.breed, dogAllOf.breed); - } - - @Override - public int hashCode() { - return Objects.hash(breed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DogAllOf {\n"); - sb.append(" breed: ").append(toIndentedString(breed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/BigCatAllOfTest.java b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/BigCatAllOfTest.java deleted file mode 100644 index 8e291df45f1..00000000000 --- a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/BigCatAllOfTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for BigCatAllOf - */ -public class BigCatAllOfTest { - private final BigCatAllOf model = new BigCatAllOf(); - - /** - * Model tests for BigCatAllOf - */ - @Test - public void testBigCatAllOf() { - // TODO: test BigCatAllOf - } - - /** - * Test the property 'kind' - */ - @Test - public void kindTest() { - // TODO: test kind - } - -} diff --git a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/BigCatTest.java b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/BigCatTest.java index f6c4621c9ea..765bd150512 100644 --- a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/BigCatTest.java +++ b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/BigCatTest.java @@ -26,7 +26,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for BigCat */ diff --git a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/CatAllOfTest.java b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/CatAllOfTest.java deleted file mode 100644 index 269bdbe11b7..00000000000 --- a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/CatAllOfTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for CatAllOf - */ -public class CatAllOfTest { - private final CatAllOf model = new CatAllOf(); - - /** - * Model tests for CatAllOf - */ - @Test - public void testCatAllOf() { - // TODO: test CatAllOf - } - - /** - * Test the property 'declawed' - */ - @Test - public void declawedTest() { - // TODO: test declawed - } - -} diff --git a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/DogAllOfTest.java b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/DogAllOfTest.java deleted file mode 100644 index dfa91c25ec8..00000000000 --- a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/model/DogAllOfTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for DogAllOf - */ -public class DogAllOfTest { - private final DogAllOf model = new DogAllOf(); - - /** - * Model tests for DogAllOf - */ - @Test - public void testDogAllOf() { - // TODO: test DogAllOf - } - - /** - * Test the property 'breed' - */ - @Test - public void breedTest() { - // TODO: test breed - } - -} diff --git a/samples/client/petstore/java/resttemplate-withXml/.openapi-generator/FILES b/samples/client/petstore/java/resttemplate-withXml/.openapi-generator/FILES index 399977b8b4f..c298b2c2941 100644 --- a/samples/client/petstore/java/resttemplate-withXml/.openapi-generator/FILES +++ b/samples/client/petstore/java/resttemplate-withXml/.openapi-generator/FILES @@ -19,15 +19,12 @@ docs/ArrayOfArrayOfNumberOnly.md docs/ArrayOfNumberOnly.md docs/ArrayTest.md docs/BigCat.md -docs/BigCatAllOf.md docs/Capitalization.md docs/Cat.md -docs/CatAllOf.md docs/Category.md docs/ClassModel.md docs/Client.md docs/Dog.md -docs/DogAllOf.md docs/EnumArrays.md docs/EnumClass.md docs/EnumTest.md @@ -98,15 +95,12 @@ src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java src/main/java/org/openapitools/client/model/ArrayTest.java src/main/java/org/openapitools/client/model/BigCat.java -src/main/java/org/openapitools/client/model/BigCatAllOf.java src/main/java/org/openapitools/client/model/Capitalization.java src/main/java/org/openapitools/client/model/Cat.java -src/main/java/org/openapitools/client/model/CatAllOf.java src/main/java/org/openapitools/client/model/Category.java src/main/java/org/openapitools/client/model/ClassModel.java src/main/java/org/openapitools/client/model/Client.java src/main/java/org/openapitools/client/model/Dog.java -src/main/java/org/openapitools/client/model/DogAllOf.java src/main/java/org/openapitools/client/model/EnumArrays.java src/main/java/org/openapitools/client/model/EnumClass.java src/main/java/org/openapitools/client/model/EnumTest.java diff --git a/samples/client/petstore/java/resttemplate-withXml/README.md b/samples/client/petstore/java/resttemplate-withXml/README.md index ee9fc09d475..426f315b0ba 100644 --- a/samples/client/petstore/java/resttemplate-withXml/README.md +++ b/samples/client/petstore/java/resttemplate-withXml/README.md @@ -167,15 +167,12 @@ Class | Method | HTTP request | Description - [ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md) - [ArrayTest](docs/ArrayTest.md) - [BigCat](docs/BigCat.md) - - [BigCatAllOf](docs/BigCatAllOf.md) - [Capitalization](docs/Capitalization.md) - [Cat](docs/Cat.md) - - [CatAllOf](docs/CatAllOf.md) - [Category](docs/Category.md) - [ClassModel](docs/ClassModel.md) - [Client](docs/Client.md) - [Dog](docs/Dog.md) - - [DogAllOf](docs/DogAllOf.md) - [EnumArrays](docs/EnumArrays.md) - [EnumClass](docs/EnumClass.md) - [EnumTest](docs/EnumTest.md) diff --git a/samples/client/petstore/java/resttemplate-withXml/api/openapi.yaml b/samples/client/petstore/java/resttemplate-withXml/api/openapi.yaml index e7e17402f6f..dbf370f445d 100644 --- a/samples/client/petstore/java/resttemplate-withXml/api/openapi.yaml +++ b/samples/client/petstore/java/resttemplate-withXml/api/openapi.yaml @@ -1364,15 +1364,29 @@ components: Dog: allOf: - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Dog_allOf' + - properties: + breed: + type: string + type: object Cat: allOf: - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Cat_allOf' + - properties: + declawed: + type: boolean + type: object BigCat: allOf: - $ref: '#/components/schemas/Cat' - - $ref: '#/components/schemas/BigCat_allOf' + - properties: + kind: + enum: + - lions + - tigers + - leopards + - jaguars + type: string + type: object Animal: discriminator: propertyName: className @@ -2165,29 +2179,6 @@ components: required: - requiredFile type: object - Dog_allOf: - properties: - breed: - type: string - type: object - example: null - Cat_allOf: - properties: - declawed: - type: boolean - type: object - example: null - BigCat_allOf: - properties: - kind: - enum: - - lions - - tigers - - leopards - - jaguars - type: string - type: object - example: null securitySchemes: petstore_auth: flows: diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/BigCatAllOf.md b/samples/client/petstore/java/resttemplate-withXml/docs/BigCatAllOf.md deleted file mode 100644 index 2bee213a607..00000000000 --- a/samples/client/petstore/java/resttemplate-withXml/docs/BigCatAllOf.md +++ /dev/null @@ -1,24 +0,0 @@ - - -# BigCatAllOf - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**kind** | [**KindEnum**](#KindEnum) | | [optional] | - - - -## Enum: KindEnum - -| Name | Value | -|---- | -----| -| LIONS | "lions" | -| TIGERS | "tigers" | -| LEOPARDS | "leopards" | -| JAGUARS | "jaguars" | - - - diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/CatAllOf.md b/samples/client/petstore/java/resttemplate-withXml/docs/CatAllOf.md deleted file mode 100644 index 926bc0abd78..00000000000 --- a/samples/client/petstore/java/resttemplate-withXml/docs/CatAllOf.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# CatAllOf - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**declawed** | **Boolean** | | [optional] | - - - diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/DogAllOf.md b/samples/client/petstore/java/resttemplate-withXml/docs/DogAllOf.md deleted file mode 100644 index d4e4ea0d548..00000000000 --- a/samples/client/petstore/java/resttemplate-withXml/docs/DogAllOf.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# DogAllOf - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**breed** | **String** | | [optional] | - - - diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/BigCatAllOf.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/BigCatAllOf.java deleted file mode 100644 index 617e7b6a1da..00000000000 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/BigCatAllOf.java +++ /dev/null @@ -1,159 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.dataformat.xml.annotation.*; -import javax.xml.bind.annotation.*; -import javax.xml.bind.annotation.adapters.*; -import io.github.threetenjaxb.core.*; - -/** - * BigCatAllOf - */ -@JsonPropertyOrder({ - BigCatAllOf.JSON_PROPERTY_KIND -}) -@JsonTypeName("BigCat_allOf") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -@XmlRootElement(name = "BigCatAllOf") -@XmlAccessorType(XmlAccessType.FIELD) -@JacksonXmlRootElement(localName = "BigCatAllOf") -public class BigCatAllOf { - /** - * Gets or Sets kind - */ - @XmlType(name="KindEnum") - @XmlEnum(String.class) - public enum KindEnum { - @XmlEnumValue("lions") - LIONS("lions"), - - @XmlEnumValue("tigers") - TIGERS("tigers"), - - @XmlEnumValue("leopards") - LEOPARDS("leopards"), - - @XmlEnumValue("jaguars") - JAGUARS("jaguars"); - - private String value; - - KindEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static KindEnum fromValue(String value) { - for (KindEnum b : KindEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - public static final String JSON_PROPERTY_KIND = "kind"; - @XmlElement(name = "kind") - private KindEnum kind; - - public BigCatAllOf() { - } - - public BigCatAllOf kind(KindEnum kind) { - - this.kind = kind; - return this; - } - - /** - * Get kind - * @return kind - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_KIND) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - @JacksonXmlProperty(localName = "kind") - - public KindEnum getKind() { - return kind; - } - - - @JsonProperty(JSON_PROPERTY_KIND) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - @JacksonXmlProperty(localName = "kind") - public void setKind(KindEnum kind) { - this.kind = kind; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BigCatAllOf bigCatAllOf = (BigCatAllOf) o; - return Objects.equals(this.kind, bigCatAllOf.kind); - } - - @Override - public int hashCode() { - return Objects.hash(kind); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BigCatAllOf {\n"); - sb.append(" kind: ").append(toIndentedString(kind)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/CatAllOf.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/CatAllOf.java deleted file mode 100644 index 1a3e13dfd3c..00000000000 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/CatAllOf.java +++ /dev/null @@ -1,114 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.dataformat.xml.annotation.*; -import javax.xml.bind.annotation.*; -import javax.xml.bind.annotation.adapters.*; -import io.github.threetenjaxb.core.*; - -/** - * CatAllOf - */ -@JsonPropertyOrder({ - CatAllOf.JSON_PROPERTY_DECLAWED -}) -@JsonTypeName("Cat_allOf") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -@XmlRootElement(name = "CatAllOf") -@XmlAccessorType(XmlAccessType.FIELD) -@JacksonXmlRootElement(localName = "CatAllOf") -public class CatAllOf { - public static final String JSON_PROPERTY_DECLAWED = "declawed"; - @XmlElement(name = "declawed") - private Boolean declawed; - - public CatAllOf() { - } - - public CatAllOf declawed(Boolean declawed) { - - this.declawed = declawed; - return this; - } - - /** - * Get declawed - * @return declawed - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DECLAWED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - @JacksonXmlProperty(localName = "declawed") - - public Boolean getDeclawed() { - return declawed; - } - - - @JsonProperty(JSON_PROPERTY_DECLAWED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - @JacksonXmlProperty(localName = "declawed") - public void setDeclawed(Boolean declawed) { - this.declawed = declawed; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CatAllOf catAllOf = (CatAllOf) o; - return Objects.equals(this.declawed, catAllOf.declawed); - } - - @Override - public int hashCode() { - return Objects.hash(declawed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CatAllOf {\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/DogAllOf.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/DogAllOf.java deleted file mode 100644 index 334c5ff8c0b..00000000000 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/DogAllOf.java +++ /dev/null @@ -1,114 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.dataformat.xml.annotation.*; -import javax.xml.bind.annotation.*; -import javax.xml.bind.annotation.adapters.*; -import io.github.threetenjaxb.core.*; - -/** - * DogAllOf - */ -@JsonPropertyOrder({ - DogAllOf.JSON_PROPERTY_BREED -}) -@JsonTypeName("Dog_allOf") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -@XmlRootElement(name = "DogAllOf") -@XmlAccessorType(XmlAccessType.FIELD) -@JacksonXmlRootElement(localName = "DogAllOf") -public class DogAllOf { - public static final String JSON_PROPERTY_BREED = "breed"; - @XmlElement(name = "breed") - private String breed; - - public DogAllOf() { - } - - public DogAllOf breed(String breed) { - - this.breed = breed; - return this; - } - - /** - * Get breed - * @return breed - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_BREED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - @JacksonXmlProperty(localName = "breed") - - public String getBreed() { - return breed; - } - - - @JsonProperty(JSON_PROPERTY_BREED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - @JacksonXmlProperty(localName = "breed") - public void setBreed(String breed) { - this.breed = breed; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DogAllOf dogAllOf = (DogAllOf) o; - return Objects.equals(this.breed, dogAllOf.breed); - } - - @Override - public int hashCode() { - return Objects.hash(breed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DogAllOf {\n"); - sb.append(" breed: ").append(toIndentedString(breed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/BigCatAllOfTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/BigCatAllOfTest.java deleted file mode 100644 index 8e291df45f1..00000000000 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/BigCatAllOfTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for BigCatAllOf - */ -public class BigCatAllOfTest { - private final BigCatAllOf model = new BigCatAllOf(); - - /** - * Model tests for BigCatAllOf - */ - @Test - public void testBigCatAllOf() { - // TODO: test BigCatAllOf - } - - /** - * Test the property 'kind' - */ - @Test - public void kindTest() { - // TODO: test kind - } - -} diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/BigCatTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/BigCatTest.java index f6c4621c9ea..765bd150512 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/BigCatTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/BigCatTest.java @@ -26,7 +26,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for BigCat */ diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/CatAllOfTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/CatAllOfTest.java deleted file mode 100644 index 269bdbe11b7..00000000000 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/CatAllOfTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for CatAllOf - */ -public class CatAllOfTest { - private final CatAllOf model = new CatAllOf(); - - /** - * Model tests for CatAllOf - */ - @Test - public void testCatAllOf() { - // TODO: test CatAllOf - } - - /** - * Test the property 'declawed' - */ - @Test - public void declawedTest() { - // TODO: test declawed - } - -} diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/DogAllOfTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/DogAllOfTest.java deleted file mode 100644 index dfa91c25ec8..00000000000 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/model/DogAllOfTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for DogAllOf - */ -public class DogAllOfTest { - private final DogAllOf model = new DogAllOf(); - - /** - * Model tests for DogAllOf - */ - @Test - public void testDogAllOf() { - // TODO: test DogAllOf - } - - /** - * Test the property 'breed' - */ - @Test - public void breedTest() { - // TODO: test breed - } - -} diff --git a/samples/client/petstore/java/resttemplate/.openapi-generator/FILES b/samples/client/petstore/java/resttemplate/.openapi-generator/FILES index 399977b8b4f..c298b2c2941 100644 --- a/samples/client/petstore/java/resttemplate/.openapi-generator/FILES +++ b/samples/client/petstore/java/resttemplate/.openapi-generator/FILES @@ -19,15 +19,12 @@ docs/ArrayOfArrayOfNumberOnly.md docs/ArrayOfNumberOnly.md docs/ArrayTest.md docs/BigCat.md -docs/BigCatAllOf.md docs/Capitalization.md docs/Cat.md -docs/CatAllOf.md docs/Category.md docs/ClassModel.md docs/Client.md docs/Dog.md -docs/DogAllOf.md docs/EnumArrays.md docs/EnumClass.md docs/EnumTest.md @@ -98,15 +95,12 @@ src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java src/main/java/org/openapitools/client/model/ArrayTest.java src/main/java/org/openapitools/client/model/BigCat.java -src/main/java/org/openapitools/client/model/BigCatAllOf.java src/main/java/org/openapitools/client/model/Capitalization.java src/main/java/org/openapitools/client/model/Cat.java -src/main/java/org/openapitools/client/model/CatAllOf.java src/main/java/org/openapitools/client/model/Category.java src/main/java/org/openapitools/client/model/ClassModel.java src/main/java/org/openapitools/client/model/Client.java src/main/java/org/openapitools/client/model/Dog.java -src/main/java/org/openapitools/client/model/DogAllOf.java src/main/java/org/openapitools/client/model/EnumArrays.java src/main/java/org/openapitools/client/model/EnumClass.java src/main/java/org/openapitools/client/model/EnumTest.java diff --git a/samples/client/petstore/java/resttemplate/README.md b/samples/client/petstore/java/resttemplate/README.md index aa5c382b09a..c2f7413a422 100644 --- a/samples/client/petstore/java/resttemplate/README.md +++ b/samples/client/petstore/java/resttemplate/README.md @@ -167,15 +167,12 @@ Class | Method | HTTP request | Description - [ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md) - [ArrayTest](docs/ArrayTest.md) - [BigCat](docs/BigCat.md) - - [BigCatAllOf](docs/BigCatAllOf.md) - [Capitalization](docs/Capitalization.md) - [Cat](docs/Cat.md) - - [CatAllOf](docs/CatAllOf.md) - [Category](docs/Category.md) - [ClassModel](docs/ClassModel.md) - [Client](docs/Client.md) - [Dog](docs/Dog.md) - - [DogAllOf](docs/DogAllOf.md) - [EnumArrays](docs/EnumArrays.md) - [EnumClass](docs/EnumClass.md) - [EnumTest](docs/EnumTest.md) diff --git a/samples/client/petstore/java/resttemplate/api/openapi.yaml b/samples/client/petstore/java/resttemplate/api/openapi.yaml index e7e17402f6f..dbf370f445d 100644 --- a/samples/client/petstore/java/resttemplate/api/openapi.yaml +++ b/samples/client/petstore/java/resttemplate/api/openapi.yaml @@ -1364,15 +1364,29 @@ components: Dog: allOf: - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Dog_allOf' + - properties: + breed: + type: string + type: object Cat: allOf: - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Cat_allOf' + - properties: + declawed: + type: boolean + type: object BigCat: allOf: - $ref: '#/components/schemas/Cat' - - $ref: '#/components/schemas/BigCat_allOf' + - properties: + kind: + enum: + - lions + - tigers + - leopards + - jaguars + type: string + type: object Animal: discriminator: propertyName: className @@ -2165,29 +2179,6 @@ components: required: - requiredFile type: object - Dog_allOf: - properties: - breed: - type: string - type: object - example: null - Cat_allOf: - properties: - declawed: - type: boolean - type: object - example: null - BigCat_allOf: - properties: - kind: - enum: - - lions - - tigers - - leopards - - jaguars - type: string - type: object - example: null securitySchemes: petstore_auth: flows: diff --git a/samples/client/petstore/java/resttemplate/docs/BigCatAllOf.md b/samples/client/petstore/java/resttemplate/docs/BigCatAllOf.md deleted file mode 100644 index 2bee213a607..00000000000 --- a/samples/client/petstore/java/resttemplate/docs/BigCatAllOf.md +++ /dev/null @@ -1,24 +0,0 @@ - - -# BigCatAllOf - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**kind** | [**KindEnum**](#KindEnum) | | [optional] | - - - -## Enum: KindEnum - -| Name | Value | -|---- | -----| -| LIONS | "lions" | -| TIGERS | "tigers" | -| LEOPARDS | "leopards" | -| JAGUARS | "jaguars" | - - - diff --git a/samples/client/petstore/java/resttemplate/docs/CatAllOf.md b/samples/client/petstore/java/resttemplate/docs/CatAllOf.md deleted file mode 100644 index 926bc0abd78..00000000000 --- a/samples/client/petstore/java/resttemplate/docs/CatAllOf.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# CatAllOf - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**declawed** | **Boolean** | | [optional] | - - - diff --git a/samples/client/petstore/java/resttemplate/docs/DogAllOf.md b/samples/client/petstore/java/resttemplate/docs/DogAllOf.md deleted file mode 100644 index d4e4ea0d548..00000000000 --- a/samples/client/petstore/java/resttemplate/docs/DogAllOf.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# DogAllOf - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**breed** | **String** | | [optional] | - - - diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/BigCatAllOf.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/BigCatAllOf.java deleted file mode 100644 index e357e3111ca..00000000000 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/BigCatAllOf.java +++ /dev/null @@ -1,143 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** - * BigCatAllOf - */ -@JsonPropertyOrder({ - BigCatAllOf.JSON_PROPERTY_KIND -}) -@JsonTypeName("BigCat_allOf") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class BigCatAllOf { - /** - * Gets or Sets kind - */ - public enum KindEnum { - LIONS("lions"), - - TIGERS("tigers"), - - LEOPARDS("leopards"), - - JAGUARS("jaguars"); - - private String value; - - KindEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static KindEnum fromValue(String value) { - for (KindEnum b : KindEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - public static final String JSON_PROPERTY_KIND = "kind"; - private KindEnum kind; - - public BigCatAllOf() { - } - - public BigCatAllOf kind(KindEnum kind) { - - this.kind = kind; - return this; - } - - /** - * Get kind - * @return kind - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_KIND) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public KindEnum getKind() { - return kind; - } - - - @JsonProperty(JSON_PROPERTY_KIND) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setKind(KindEnum kind) { - this.kind = kind; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BigCatAllOf bigCatAllOf = (BigCatAllOf) o; - return Objects.equals(this.kind, bigCatAllOf.kind); - } - - @Override - public int hashCode() { - return Objects.hash(kind); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BigCatAllOf {\n"); - sb.append(" kind: ").append(toIndentedString(kind)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/CatAllOf.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/CatAllOf.java deleted file mode 100644 index 7c404d48482..00000000000 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/CatAllOf.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** - * CatAllOf - */ -@JsonPropertyOrder({ - CatAllOf.JSON_PROPERTY_DECLAWED -}) -@JsonTypeName("Cat_allOf") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CatAllOf { - public static final String JSON_PROPERTY_DECLAWED = "declawed"; - private Boolean declawed; - - public CatAllOf() { - } - - public CatAllOf declawed(Boolean declawed) { - - this.declawed = declawed; - return this; - } - - /** - * Get declawed - * @return declawed - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DECLAWED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Boolean getDeclawed() { - return declawed; - } - - - @JsonProperty(JSON_PROPERTY_DECLAWED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDeclawed(Boolean declawed) { - this.declawed = declawed; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CatAllOf catAllOf = (CatAllOf) o; - return Objects.equals(this.declawed, catAllOf.declawed); - } - - @Override - public int hashCode() { - return Objects.hash(declawed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CatAllOf {\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/DogAllOf.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/DogAllOf.java deleted file mode 100644 index 2978c34e2cc..00000000000 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/DogAllOf.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** - * DogAllOf - */ -@JsonPropertyOrder({ - DogAllOf.JSON_PROPERTY_BREED -}) -@JsonTypeName("Dog_allOf") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DogAllOf { - public static final String JSON_PROPERTY_BREED = "breed"; - private String breed; - - public DogAllOf() { - } - - public DogAllOf breed(String breed) { - - this.breed = breed; - return this; - } - - /** - * Get breed - * @return breed - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_BREED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getBreed() { - return breed; - } - - - @JsonProperty(JSON_PROPERTY_BREED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setBreed(String breed) { - this.breed = breed; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DogAllOf dogAllOf = (DogAllOf) o; - return Objects.equals(this.breed, dogAllOf.breed); - } - - @Override - public int hashCode() { - return Objects.hash(breed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DogAllOf {\n"); - sb.append(" breed: ").append(toIndentedString(breed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/BigCatAllOfTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/BigCatAllOfTest.java deleted file mode 100644 index 8e291df45f1..00000000000 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/BigCatAllOfTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for BigCatAllOf - */ -public class BigCatAllOfTest { - private final BigCatAllOf model = new BigCatAllOf(); - - /** - * Model tests for BigCatAllOf - */ - @Test - public void testBigCatAllOf() { - // TODO: test BigCatAllOf - } - - /** - * Test the property 'kind' - */ - @Test - public void kindTest() { - // TODO: test kind - } - -} diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/BigCatTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/BigCatTest.java index f6c4621c9ea..765bd150512 100644 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/BigCatTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/BigCatTest.java @@ -26,7 +26,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for BigCat */ diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/CatAllOfTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/CatAllOfTest.java deleted file mode 100644 index 269bdbe11b7..00000000000 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/CatAllOfTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for CatAllOf - */ -public class CatAllOfTest { - private final CatAllOf model = new CatAllOf(); - - /** - * Model tests for CatAllOf - */ - @Test - public void testCatAllOf() { - // TODO: test CatAllOf - } - - /** - * Test the property 'declawed' - */ - @Test - public void declawedTest() { - // TODO: test declawed - } - -} diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/DogAllOfTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/DogAllOfTest.java deleted file mode 100644 index dfa91c25ec8..00000000000 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/DogAllOfTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for DogAllOf - */ -public class DogAllOfTest { - private final DogAllOf model = new DogAllOf(); - - /** - * Model tests for DogAllOf - */ - @Test - public void testDogAllOf() { - // TODO: test DogAllOf - } - - /** - * Test the property 'breed' - */ - @Test - public void breedTest() { - // TODO: test breed - } - -} diff --git a/samples/client/petstore/java/retrofit2-play26/.openapi-generator/FILES b/samples/client/petstore/java/retrofit2-play26/.openapi-generator/FILES index efc123c78ce..49cbeaf249c 100644 --- a/samples/client/petstore/java/retrofit2-play26/.openapi-generator/FILES +++ b/samples/client/petstore/java/retrofit2-play26/.openapi-generator/FILES @@ -19,15 +19,12 @@ docs/ArrayOfArrayOfNumberOnly.md docs/ArrayOfNumberOnly.md docs/ArrayTest.md docs/BigCat.md -docs/BigCatAllOf.md docs/Capitalization.md docs/Cat.md -docs/CatAllOf.md docs/Category.md docs/ClassModel.md docs/Client.md docs/Dog.md -docs/DogAllOf.md docs/EnumArrays.md docs/EnumClass.md docs/EnumTest.md @@ -99,15 +96,12 @@ src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java src/main/java/org/openapitools/client/model/ArrayTest.java src/main/java/org/openapitools/client/model/BigCat.java -src/main/java/org/openapitools/client/model/BigCatAllOf.java src/main/java/org/openapitools/client/model/Capitalization.java src/main/java/org/openapitools/client/model/Cat.java -src/main/java/org/openapitools/client/model/CatAllOf.java src/main/java/org/openapitools/client/model/Category.java src/main/java/org/openapitools/client/model/ClassModel.java src/main/java/org/openapitools/client/model/Client.java src/main/java/org/openapitools/client/model/Dog.java -src/main/java/org/openapitools/client/model/DogAllOf.java src/main/java/org/openapitools/client/model/EnumArrays.java src/main/java/org/openapitools/client/model/EnumClass.java src/main/java/org/openapitools/client/model/EnumTest.java diff --git a/samples/client/petstore/java/retrofit2-play26/api/openapi.yaml b/samples/client/petstore/java/retrofit2-play26/api/openapi.yaml index e7e17402f6f..dbf370f445d 100644 --- a/samples/client/petstore/java/retrofit2-play26/api/openapi.yaml +++ b/samples/client/petstore/java/retrofit2-play26/api/openapi.yaml @@ -1364,15 +1364,29 @@ components: Dog: allOf: - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Dog_allOf' + - properties: + breed: + type: string + type: object Cat: allOf: - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Cat_allOf' + - properties: + declawed: + type: boolean + type: object BigCat: allOf: - $ref: '#/components/schemas/Cat' - - $ref: '#/components/schemas/BigCat_allOf' + - properties: + kind: + enum: + - lions + - tigers + - leopards + - jaguars + type: string + type: object Animal: discriminator: propertyName: className @@ -2165,29 +2179,6 @@ components: required: - requiredFile type: object - Dog_allOf: - properties: - breed: - type: string - type: object - example: null - Cat_allOf: - properties: - declawed: - type: boolean - type: object - example: null - BigCat_allOf: - properties: - kind: - enum: - - lions - - tigers - - leopards - - jaguars - type: string - type: object - example: null securitySchemes: petstore_auth: flows: diff --git a/samples/client/petstore/java/retrofit2-play26/docs/BigCatAllOf.md b/samples/client/petstore/java/retrofit2-play26/docs/BigCatAllOf.md deleted file mode 100644 index 2bee213a607..00000000000 --- a/samples/client/petstore/java/retrofit2-play26/docs/BigCatAllOf.md +++ /dev/null @@ -1,24 +0,0 @@ - - -# BigCatAllOf - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**kind** | [**KindEnum**](#KindEnum) | | [optional] | - - - -## Enum: KindEnum - -| Name | Value | -|---- | -----| -| LIONS | "lions" | -| TIGERS | "tigers" | -| LEOPARDS | "leopards" | -| JAGUARS | "jaguars" | - - - diff --git a/samples/client/petstore/java/retrofit2-play26/docs/CatAllOf.md b/samples/client/petstore/java/retrofit2-play26/docs/CatAllOf.md deleted file mode 100644 index 926bc0abd78..00000000000 --- a/samples/client/petstore/java/retrofit2-play26/docs/CatAllOf.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# CatAllOf - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**declawed** | **Boolean** | | [optional] | - - - diff --git a/samples/client/petstore/java/retrofit2-play26/docs/DogAllOf.md b/samples/client/petstore/java/retrofit2-play26/docs/DogAllOf.md deleted file mode 100644 index d4e4ea0d548..00000000000 --- a/samples/client/petstore/java/retrofit2-play26/docs/DogAllOf.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# DogAllOf - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**breed** | **String** | | [optional] | - - - diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/BigCatAllOf.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/BigCatAllOf.java deleted file mode 100644 index c9b7b7bf9b9..00000000000 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/BigCatAllOf.java +++ /dev/null @@ -1,146 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeName; -import javax.validation.constraints.*; -import javax.validation.Valid; - -/** - * BigCatAllOf - */ -@JsonPropertyOrder({ - BigCatAllOf.JSON_PROPERTY_KIND -}) -@JsonTypeName("BigCat_allOf") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class BigCatAllOf { - /** - * Gets or Sets kind - */ - public enum KindEnum { - LIONS("lions"), - - TIGERS("tigers"), - - LEOPARDS("leopards"), - - JAGUARS("jaguars"); - - private String value; - - KindEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static KindEnum fromValue(String value) { - for (KindEnum b : KindEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - public static final String JSON_PROPERTY_KIND = "kind"; - private KindEnum kind; - - public BigCatAllOf() { - } - - public BigCatAllOf kind(KindEnum kind) { - - this.kind = kind; - return this; - } - - /** - * Get kind - * @return kind - **/ - @javax.annotation.Nullable - - @JsonProperty(JSON_PROPERTY_KIND) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public KindEnum getKind() { - return kind; - } - - - @JsonProperty(JSON_PROPERTY_KIND) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setKind(KindEnum kind) { - this.kind = kind; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BigCatAllOf bigCatAllOf = (BigCatAllOf) o; - return Objects.equals(this.kind, bigCatAllOf.kind); - } - - @Override - public int hashCode() { - return Objects.hash(kind); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BigCatAllOf {\n"); - sb.append(" kind: ").append(toIndentedString(kind)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/CatAllOf.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/CatAllOf.java deleted file mode 100644 index 149c8334327..00000000000 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/CatAllOf.java +++ /dev/null @@ -1,107 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeName; -import javax.validation.constraints.*; -import javax.validation.Valid; - -/** - * CatAllOf - */ -@JsonPropertyOrder({ - CatAllOf.JSON_PROPERTY_DECLAWED -}) -@JsonTypeName("Cat_allOf") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CatAllOf { - public static final String JSON_PROPERTY_DECLAWED = "declawed"; - private Boolean declawed; - - public CatAllOf() { - } - - public CatAllOf declawed(Boolean declawed) { - - this.declawed = declawed; - return this; - } - - /** - * Get declawed - * @return declawed - **/ - @javax.annotation.Nullable - - @JsonProperty(JSON_PROPERTY_DECLAWED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Boolean getDeclawed() { - return declawed; - } - - - @JsonProperty(JSON_PROPERTY_DECLAWED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDeclawed(Boolean declawed) { - this.declawed = declawed; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CatAllOf catAllOf = (CatAllOf) o; - return Objects.equals(this.declawed, catAllOf.declawed); - } - - @Override - public int hashCode() { - return Objects.hash(declawed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CatAllOf {\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/DogAllOf.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/DogAllOf.java deleted file mode 100644 index 7d0c456524f..00000000000 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/model/DogAllOf.java +++ /dev/null @@ -1,107 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeName; -import javax.validation.constraints.*; -import javax.validation.Valid; - -/** - * DogAllOf - */ -@JsonPropertyOrder({ - DogAllOf.JSON_PROPERTY_BREED -}) -@JsonTypeName("Dog_allOf") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DogAllOf { - public static final String JSON_PROPERTY_BREED = "breed"; - private String breed; - - public DogAllOf() { - } - - public DogAllOf breed(String breed) { - - this.breed = breed; - return this; - } - - /** - * Get breed - * @return breed - **/ - @javax.annotation.Nullable - - @JsonProperty(JSON_PROPERTY_BREED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getBreed() { - return breed; - } - - - @JsonProperty(JSON_PROPERTY_BREED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setBreed(String breed) { - this.breed = breed; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DogAllOf dogAllOf = (DogAllOf) o; - return Objects.equals(this.breed, dogAllOf.breed); - } - - @Override - public int hashCode() { - return Objects.hash(breed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DogAllOf {\n"); - sb.append(" breed: ").append(toIndentedString(breed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/retrofit2-play26/src/test/java/org/openapitools/client/model/BigCatAllOfTest.java b/samples/client/petstore/java/retrofit2-play26/src/test/java/org/openapitools/client/model/BigCatAllOfTest.java deleted file mode 100644 index a9b13011f00..00000000000 --- a/samples/client/petstore/java/retrofit2-play26/src/test/java/org/openapitools/client/model/BigCatAllOfTest.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -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 org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for BigCatAllOf - */ -public class BigCatAllOfTest { - private final BigCatAllOf model = new BigCatAllOf(); - - /** - * Model tests for BigCatAllOf - */ - @Test - public void testBigCatAllOf() { - // TODO: test BigCatAllOf - } - - /** - * Test the property 'kind' - */ - @Test - public void kindTest() { - // TODO: test kind - } - -} diff --git a/samples/client/petstore/java/retrofit2-play26/src/test/java/org/openapitools/client/model/BigCatTest.java b/samples/client/petstore/java/retrofit2-play26/src/test/java/org/openapitools/client/model/BigCatTest.java index 006c8070742..765bd150512 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/test/java/org/openapitools/client/model/BigCatTest.java +++ b/samples/client/petstore/java/retrofit2-play26/src/test/java/org/openapitools/client/model/BigCatTest.java @@ -13,19 +13,19 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.openapitools.client.model.BigCatAllOf; import org.openapitools.client.model.Cat; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for BigCat */ diff --git a/samples/client/petstore/java/retrofit2-play26/src/test/java/org/openapitools/client/model/CatAllOfTest.java b/samples/client/petstore/java/retrofit2-play26/src/test/java/org/openapitools/client/model/CatAllOfTest.java deleted file mode 100644 index 69b226745d7..00000000000 --- a/samples/client/petstore/java/retrofit2-play26/src/test/java/org/openapitools/client/model/CatAllOfTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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. - */ - - -package org.openapitools.client.model; - -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 org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for CatAllOf - */ -public class CatAllOfTest { - private final CatAllOf model = new CatAllOf(); - - /** - * Model tests for CatAllOf - */ - @Test - public void testCatAllOf() { - // TODO: test CatAllOf - } - - /** - * Test the property 'declawed' - */ - @Test - public void declawedTest() { - // TODO: test declawed - } - -} diff --git a/samples/client/petstore/java/retrofit2-play26/src/test/java/org/openapitools/client/model/DogAllOfTest.java b/samples/client/petstore/java/retrofit2-play26/src/test/java/org/openapitools/client/model/DogAllOfTest.java deleted file mode 100644 index 1b83dcefc4f..00000000000 --- a/samples/client/petstore/java/retrofit2-play26/src/test/java/org/openapitools/client/model/DogAllOfTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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. - */ - - -package org.openapitools.client.model; - -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 org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for DogAllOf - */ -public class DogAllOfTest { - private final DogAllOf model = new DogAllOf(); - - /** - * Model tests for DogAllOf - */ - @Test - public void testDogAllOf() { - // TODO: test DogAllOf - } - - /** - * Test the property 'breed' - */ - @Test - public void breedTest() { - // TODO: test breed - } - -} diff --git a/samples/client/petstore/java/retrofit2/.openapi-generator/FILES b/samples/client/petstore/java/retrofit2/.openapi-generator/FILES index bdac9a27ea5..b3525d4b8f2 100644 --- a/samples/client/petstore/java/retrofit2/.openapi-generator/FILES +++ b/samples/client/petstore/java/retrofit2/.openapi-generator/FILES @@ -19,15 +19,12 @@ docs/ArrayOfArrayOfNumberOnly.md docs/ArrayOfNumberOnly.md docs/ArrayTest.md docs/BigCat.md -docs/BigCatAllOf.md docs/Capitalization.md docs/Cat.md -docs/CatAllOf.md docs/Category.md docs/ClassModel.md docs/Client.md docs/Dog.md -docs/DogAllOf.md docs/EnumArrays.md docs/EnumClass.md docs/EnumTest.md @@ -99,15 +96,12 @@ src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java src/main/java/org/openapitools/client/model/ArrayTest.java src/main/java/org/openapitools/client/model/BigCat.java -src/main/java/org/openapitools/client/model/BigCatAllOf.java src/main/java/org/openapitools/client/model/Capitalization.java src/main/java/org/openapitools/client/model/Cat.java -src/main/java/org/openapitools/client/model/CatAllOf.java src/main/java/org/openapitools/client/model/Category.java src/main/java/org/openapitools/client/model/ClassModel.java src/main/java/org/openapitools/client/model/Client.java src/main/java/org/openapitools/client/model/Dog.java -src/main/java/org/openapitools/client/model/DogAllOf.java src/main/java/org/openapitools/client/model/EnumArrays.java src/main/java/org/openapitools/client/model/EnumClass.java src/main/java/org/openapitools/client/model/EnumTest.java diff --git a/samples/client/petstore/java/retrofit2/api/openapi.yaml b/samples/client/petstore/java/retrofit2/api/openapi.yaml index e7e17402f6f..dbf370f445d 100644 --- a/samples/client/petstore/java/retrofit2/api/openapi.yaml +++ b/samples/client/petstore/java/retrofit2/api/openapi.yaml @@ -1364,15 +1364,29 @@ components: Dog: allOf: - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Dog_allOf' + - properties: + breed: + type: string + type: object Cat: allOf: - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Cat_allOf' + - properties: + declawed: + type: boolean + type: object BigCat: allOf: - $ref: '#/components/schemas/Cat' - - $ref: '#/components/schemas/BigCat_allOf' + - properties: + kind: + enum: + - lions + - tigers + - leopards + - jaguars + type: string + type: object Animal: discriminator: propertyName: className @@ -2165,29 +2179,6 @@ components: required: - requiredFile type: object - Dog_allOf: - properties: - breed: - type: string - type: object - example: null - Cat_allOf: - properties: - declawed: - type: boolean - type: object - example: null - BigCat_allOf: - properties: - kind: - enum: - - lions - - tigers - - leopards - - jaguars - type: string - type: object - example: null securitySchemes: petstore_auth: flows: diff --git a/samples/client/petstore/java/retrofit2/docs/BigCatAllOf.md b/samples/client/petstore/java/retrofit2/docs/BigCatAllOf.md deleted file mode 100644 index 2bee213a607..00000000000 --- a/samples/client/petstore/java/retrofit2/docs/BigCatAllOf.md +++ /dev/null @@ -1,24 +0,0 @@ - - -# BigCatAllOf - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**kind** | [**KindEnum**](#KindEnum) | | [optional] | - - - -## Enum: KindEnum - -| Name | Value | -|---- | -----| -| LIONS | "lions" | -| TIGERS | "tigers" | -| LEOPARDS | "leopards" | -| JAGUARS | "jaguars" | - - - diff --git a/samples/client/petstore/java/retrofit2/docs/CatAllOf.md b/samples/client/petstore/java/retrofit2/docs/CatAllOf.md deleted file mode 100644 index 926bc0abd78..00000000000 --- a/samples/client/petstore/java/retrofit2/docs/CatAllOf.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# CatAllOf - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**declawed** | **Boolean** | | [optional] | - - - diff --git a/samples/client/petstore/java/retrofit2/docs/DogAllOf.md b/samples/client/petstore/java/retrofit2/docs/DogAllOf.md deleted file mode 100644 index d4e4ea0d548..00000000000 --- a/samples/client/petstore/java/retrofit2/docs/DogAllOf.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# DogAllOf - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**breed** | **String** | | [optional] | - - - diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/BigCatAllOf.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/BigCatAllOf.java deleted file mode 100644 index dc77482df48..00000000000 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/BigCatAllOf.java +++ /dev/null @@ -1,147 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -/** - * BigCatAllOf - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class BigCatAllOf { - /** - * Gets or Sets kind - */ - @JsonAdapter(KindEnum.Adapter.class) - public enum KindEnum { - LIONS("lions"), - - TIGERS("tigers"), - - LEOPARDS("leopards"), - - JAGUARS("jaguars"); - - private String value; - - KindEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static KindEnum fromValue(String value) { - for (KindEnum b : KindEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final KindEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public KindEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return KindEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_KIND = "kind"; - @SerializedName(SERIALIZED_NAME_KIND) - private KindEnum kind; - - public BigCatAllOf() { - } - - public BigCatAllOf kind(KindEnum kind) { - - this.kind = kind; - return this; - } - - /** - * Get kind - * @return kind - **/ - @javax.annotation.Nullable - - public KindEnum getKind() { - return kind; - } - - - public void setKind(KindEnum kind) { - this.kind = kind; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BigCatAllOf bigCatAllOf = (BigCatAllOf) o; - return Objects.equals(this.kind, bigCatAllOf.kind); - } - - @Override - public int hashCode() { - return Objects.hash(kind); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BigCatAllOf {\n"); - sb.append(" kind: ").append(toIndentedString(kind)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/CatAllOf.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/CatAllOf.java deleted file mode 100644 index 1af3ba94019..00000000000 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/CatAllOf.java +++ /dev/null @@ -1,96 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -/** - * CatAllOf - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CatAllOf { - public static final String SERIALIZED_NAME_DECLAWED = "declawed"; - @SerializedName(SERIALIZED_NAME_DECLAWED) - private Boolean declawed; - - public CatAllOf() { - } - - public CatAllOf declawed(Boolean declawed) { - - this.declawed = declawed; - return this; - } - - /** - * Get declawed - * @return declawed - **/ - @javax.annotation.Nullable - - public Boolean getDeclawed() { - return declawed; - } - - - public void setDeclawed(Boolean declawed) { - this.declawed = declawed; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CatAllOf catAllOf = (CatAllOf) o; - return Objects.equals(this.declawed, catAllOf.declawed); - } - - @Override - public int hashCode() { - return Objects.hash(declawed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CatAllOf {\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/DogAllOf.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/DogAllOf.java deleted file mode 100644 index ba9be150d62..00000000000 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/model/DogAllOf.java +++ /dev/null @@ -1,96 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -/** - * DogAllOf - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DogAllOf { - public static final String SERIALIZED_NAME_BREED = "breed"; - @SerializedName(SERIALIZED_NAME_BREED) - private String breed; - - public DogAllOf() { - } - - public DogAllOf breed(String breed) { - - this.breed = breed; - return this; - } - - /** - * Get breed - * @return breed - **/ - @javax.annotation.Nullable - - public String getBreed() { - return breed; - } - - - public void setBreed(String breed) { - this.breed = breed; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DogAllOf dogAllOf = (DogAllOf) o; - return Objects.equals(this.breed, dogAllOf.breed); - } - - @Override - public int hashCode() { - return Objects.hash(breed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DogAllOf {\n"); - sb.append(" breed: ").append(toIndentedString(breed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/retrofit2/src/test/java/org/openapitools/client/model/BigCatAllOfTest.java b/samples/client/petstore/java/retrofit2/src/test/java/org/openapitools/client/model/BigCatAllOfTest.java deleted file mode 100644 index f7f725106d1..00000000000 --- a/samples/client/petstore/java/retrofit2/src/test/java/org/openapitools/client/model/BigCatAllOfTest.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for BigCatAllOf - */ -public class BigCatAllOfTest { - private final BigCatAllOf model = new BigCatAllOf(); - - /** - * Model tests for BigCatAllOf - */ - @Test - public void testBigCatAllOf() { - // TODO: test BigCatAllOf - } - - /** - * Test the property 'kind' - */ - @Test - public void kindTest() { - // TODO: test kind - } - -} diff --git a/samples/client/petstore/java/retrofit2/src/test/java/org/openapitools/client/model/BigCatTest.java b/samples/client/petstore/java/retrofit2/src/test/java/org/openapitools/client/model/BigCatTest.java index 0cb50249725..0949e1385d8 100644 --- a/samples/client/petstore/java/retrofit2/src/test/java/org/openapitools/client/model/BigCatTest.java +++ b/samples/client/petstore/java/retrofit2/src/test/java/org/openapitools/client/model/BigCatTest.java @@ -18,16 +18,12 @@ import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; -import org.openapitools.client.model.BigCatAllOf; import org.openapitools.client.model.Cat; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for BigCat */ diff --git a/samples/client/petstore/java/retrofit2/src/test/java/org/openapitools/client/model/CatAllOfTest.java b/samples/client/petstore/java/retrofit2/src/test/java/org/openapitools/client/model/CatAllOfTest.java deleted file mode 100644 index 0473dc929e5..00000000000 --- a/samples/client/petstore/java/retrofit2/src/test/java/org/openapitools/client/model/CatAllOfTest.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * 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. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for CatAllOf - */ -public class CatAllOfTest { - private final CatAllOf model = new CatAllOf(); - - /** - * Model tests for CatAllOf - */ - @Test - public void testCatAllOf() { - // TODO: test CatAllOf - } - - /** - * Test the property 'declawed' - */ - @Test - public void declawedTest() { - // TODO: test declawed - } - -} diff --git a/samples/client/petstore/java/retrofit2/src/test/java/org/openapitools/client/model/DogAllOfTest.java b/samples/client/petstore/java/retrofit2/src/test/java/org/openapitools/client/model/DogAllOfTest.java deleted file mode 100644 index 7780c14a386..00000000000 --- a/samples/client/petstore/java/retrofit2/src/test/java/org/openapitools/client/model/DogAllOfTest.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * 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. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for DogAllOf - */ -public class DogAllOfTest { - private final DogAllOf model = new DogAllOf(); - - /** - * Model tests for DogAllOf - */ - @Test - public void testDogAllOf() { - // TODO: test DogAllOf - } - - /** - * Test the property 'breed' - */ - @Test - public void breedTest() { - // TODO: test breed - } - -} diff --git a/samples/client/petstore/java/retrofit2rx2/.openapi-generator/FILES b/samples/client/petstore/java/retrofit2rx2/.openapi-generator/FILES index bdac9a27ea5..b3525d4b8f2 100644 --- a/samples/client/petstore/java/retrofit2rx2/.openapi-generator/FILES +++ b/samples/client/petstore/java/retrofit2rx2/.openapi-generator/FILES @@ -19,15 +19,12 @@ docs/ArrayOfArrayOfNumberOnly.md docs/ArrayOfNumberOnly.md docs/ArrayTest.md docs/BigCat.md -docs/BigCatAllOf.md docs/Capitalization.md docs/Cat.md -docs/CatAllOf.md docs/Category.md docs/ClassModel.md docs/Client.md docs/Dog.md -docs/DogAllOf.md docs/EnumArrays.md docs/EnumClass.md docs/EnumTest.md @@ -99,15 +96,12 @@ src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java src/main/java/org/openapitools/client/model/ArrayTest.java src/main/java/org/openapitools/client/model/BigCat.java -src/main/java/org/openapitools/client/model/BigCatAllOf.java src/main/java/org/openapitools/client/model/Capitalization.java src/main/java/org/openapitools/client/model/Cat.java -src/main/java/org/openapitools/client/model/CatAllOf.java src/main/java/org/openapitools/client/model/Category.java src/main/java/org/openapitools/client/model/ClassModel.java src/main/java/org/openapitools/client/model/Client.java src/main/java/org/openapitools/client/model/Dog.java -src/main/java/org/openapitools/client/model/DogAllOf.java src/main/java/org/openapitools/client/model/EnumArrays.java src/main/java/org/openapitools/client/model/EnumClass.java src/main/java/org/openapitools/client/model/EnumTest.java diff --git a/samples/client/petstore/java/retrofit2rx2/api/openapi.yaml b/samples/client/petstore/java/retrofit2rx2/api/openapi.yaml index e7e17402f6f..dbf370f445d 100644 --- a/samples/client/petstore/java/retrofit2rx2/api/openapi.yaml +++ b/samples/client/petstore/java/retrofit2rx2/api/openapi.yaml @@ -1364,15 +1364,29 @@ components: Dog: allOf: - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Dog_allOf' + - properties: + breed: + type: string + type: object Cat: allOf: - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Cat_allOf' + - properties: + declawed: + type: boolean + type: object BigCat: allOf: - $ref: '#/components/schemas/Cat' - - $ref: '#/components/schemas/BigCat_allOf' + - properties: + kind: + enum: + - lions + - tigers + - leopards + - jaguars + type: string + type: object Animal: discriminator: propertyName: className @@ -2165,29 +2179,6 @@ components: required: - requiredFile type: object - Dog_allOf: - properties: - breed: - type: string - type: object - example: null - Cat_allOf: - properties: - declawed: - type: boolean - type: object - example: null - BigCat_allOf: - properties: - kind: - enum: - - lions - - tigers - - leopards - - jaguars - type: string - type: object - example: null securitySchemes: petstore_auth: flows: diff --git a/samples/client/petstore/java/retrofit2rx2/docs/BigCatAllOf.md b/samples/client/petstore/java/retrofit2rx2/docs/BigCatAllOf.md deleted file mode 100644 index 2bee213a607..00000000000 --- a/samples/client/petstore/java/retrofit2rx2/docs/BigCatAllOf.md +++ /dev/null @@ -1,24 +0,0 @@ - - -# BigCatAllOf - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**kind** | [**KindEnum**](#KindEnum) | | [optional] | - - - -## Enum: KindEnum - -| Name | Value | -|---- | -----| -| LIONS | "lions" | -| TIGERS | "tigers" | -| LEOPARDS | "leopards" | -| JAGUARS | "jaguars" | - - - diff --git a/samples/client/petstore/java/retrofit2rx2/docs/CatAllOf.md b/samples/client/petstore/java/retrofit2rx2/docs/CatAllOf.md deleted file mode 100644 index 926bc0abd78..00000000000 --- a/samples/client/petstore/java/retrofit2rx2/docs/CatAllOf.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# CatAllOf - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**declawed** | **Boolean** | | [optional] | - - - diff --git a/samples/client/petstore/java/retrofit2rx2/docs/DogAllOf.md b/samples/client/petstore/java/retrofit2rx2/docs/DogAllOf.md deleted file mode 100644 index d4e4ea0d548..00000000000 --- a/samples/client/petstore/java/retrofit2rx2/docs/DogAllOf.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# DogAllOf - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**breed** | **String** | | [optional] | - - - diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/BigCatAllOf.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/BigCatAllOf.java deleted file mode 100644 index dc77482df48..00000000000 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/BigCatAllOf.java +++ /dev/null @@ -1,147 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -/** - * BigCatAllOf - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class BigCatAllOf { - /** - * Gets or Sets kind - */ - @JsonAdapter(KindEnum.Adapter.class) - public enum KindEnum { - LIONS("lions"), - - TIGERS("tigers"), - - LEOPARDS("leopards"), - - JAGUARS("jaguars"); - - private String value; - - KindEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static KindEnum fromValue(String value) { - for (KindEnum b : KindEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final KindEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public KindEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return KindEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_KIND = "kind"; - @SerializedName(SERIALIZED_NAME_KIND) - private KindEnum kind; - - public BigCatAllOf() { - } - - public BigCatAllOf kind(KindEnum kind) { - - this.kind = kind; - return this; - } - - /** - * Get kind - * @return kind - **/ - @javax.annotation.Nullable - - public KindEnum getKind() { - return kind; - } - - - public void setKind(KindEnum kind) { - this.kind = kind; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BigCatAllOf bigCatAllOf = (BigCatAllOf) o; - return Objects.equals(this.kind, bigCatAllOf.kind); - } - - @Override - public int hashCode() { - return Objects.hash(kind); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BigCatAllOf {\n"); - sb.append(" kind: ").append(toIndentedString(kind)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/CatAllOf.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/CatAllOf.java deleted file mode 100644 index 1af3ba94019..00000000000 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/CatAllOf.java +++ /dev/null @@ -1,96 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -/** - * CatAllOf - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CatAllOf { - public static final String SERIALIZED_NAME_DECLAWED = "declawed"; - @SerializedName(SERIALIZED_NAME_DECLAWED) - private Boolean declawed; - - public CatAllOf() { - } - - public CatAllOf declawed(Boolean declawed) { - - this.declawed = declawed; - return this; - } - - /** - * Get declawed - * @return declawed - **/ - @javax.annotation.Nullable - - public Boolean getDeclawed() { - return declawed; - } - - - public void setDeclawed(Boolean declawed) { - this.declawed = declawed; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CatAllOf catAllOf = (CatAllOf) o; - return Objects.equals(this.declawed, catAllOf.declawed); - } - - @Override - public int hashCode() { - return Objects.hash(declawed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CatAllOf {\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/DogAllOf.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/DogAllOf.java deleted file mode 100644 index ba9be150d62..00000000000 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/model/DogAllOf.java +++ /dev/null @@ -1,96 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -/** - * DogAllOf - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DogAllOf { - public static final String SERIALIZED_NAME_BREED = "breed"; - @SerializedName(SERIALIZED_NAME_BREED) - private String breed; - - public DogAllOf() { - } - - public DogAllOf breed(String breed) { - - this.breed = breed; - return this; - } - - /** - * Get breed - * @return breed - **/ - @javax.annotation.Nullable - - public String getBreed() { - return breed; - } - - - public void setBreed(String breed) { - this.breed = breed; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DogAllOf dogAllOf = (DogAllOf) o; - return Objects.equals(this.breed, dogAllOf.breed); - } - - @Override - public int hashCode() { - return Objects.hash(breed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DogAllOf {\n"); - sb.append(" breed: ").append(toIndentedString(breed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/retrofit2rx2/src/test/java/org/openapitools/client/model/BigCatAllOfTest.java b/samples/client/petstore/java/retrofit2rx2/src/test/java/org/openapitools/client/model/BigCatAllOfTest.java deleted file mode 100644 index f7f725106d1..00000000000 --- a/samples/client/petstore/java/retrofit2rx2/src/test/java/org/openapitools/client/model/BigCatAllOfTest.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for BigCatAllOf - */ -public class BigCatAllOfTest { - private final BigCatAllOf model = new BigCatAllOf(); - - /** - * Model tests for BigCatAllOf - */ - @Test - public void testBigCatAllOf() { - // TODO: test BigCatAllOf - } - - /** - * Test the property 'kind' - */ - @Test - public void kindTest() { - // TODO: test kind - } - -} diff --git a/samples/client/petstore/java/retrofit2rx2/src/test/java/org/openapitools/client/model/BigCatTest.java b/samples/client/petstore/java/retrofit2rx2/src/test/java/org/openapitools/client/model/BigCatTest.java index 0cb50249725..0949e1385d8 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/test/java/org/openapitools/client/model/BigCatTest.java +++ b/samples/client/petstore/java/retrofit2rx2/src/test/java/org/openapitools/client/model/BigCatTest.java @@ -18,16 +18,12 @@ import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; -import org.openapitools.client.model.BigCatAllOf; import org.openapitools.client.model.Cat; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for BigCat */ diff --git a/samples/client/petstore/java/retrofit2rx2/src/test/java/org/openapitools/client/model/CatAllOfTest.java b/samples/client/petstore/java/retrofit2rx2/src/test/java/org/openapitools/client/model/CatAllOfTest.java deleted file mode 100644 index 0473dc929e5..00000000000 --- a/samples/client/petstore/java/retrofit2rx2/src/test/java/org/openapitools/client/model/CatAllOfTest.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * 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. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for CatAllOf - */ -public class CatAllOfTest { - private final CatAllOf model = new CatAllOf(); - - /** - * Model tests for CatAllOf - */ - @Test - public void testCatAllOf() { - // TODO: test CatAllOf - } - - /** - * Test the property 'declawed' - */ - @Test - public void declawedTest() { - // TODO: test declawed - } - -} diff --git a/samples/client/petstore/java/retrofit2rx2/src/test/java/org/openapitools/client/model/DogAllOfTest.java b/samples/client/petstore/java/retrofit2rx2/src/test/java/org/openapitools/client/model/DogAllOfTest.java deleted file mode 100644 index 7780c14a386..00000000000 --- a/samples/client/petstore/java/retrofit2rx2/src/test/java/org/openapitools/client/model/DogAllOfTest.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * 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. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for DogAllOf - */ -public class DogAllOfTest { - private final DogAllOf model = new DogAllOf(); - - /** - * Model tests for DogAllOf - */ - @Test - public void testDogAllOf() { - // TODO: test DogAllOf - } - - /** - * Test the property 'breed' - */ - @Test - public void breedTest() { - // TODO: test breed - } - -} diff --git a/samples/client/petstore/java/retrofit2rx3/.openapi-generator/FILES b/samples/client/petstore/java/retrofit2rx3/.openapi-generator/FILES index bdac9a27ea5..b3525d4b8f2 100644 --- a/samples/client/petstore/java/retrofit2rx3/.openapi-generator/FILES +++ b/samples/client/petstore/java/retrofit2rx3/.openapi-generator/FILES @@ -19,15 +19,12 @@ docs/ArrayOfArrayOfNumberOnly.md docs/ArrayOfNumberOnly.md docs/ArrayTest.md docs/BigCat.md -docs/BigCatAllOf.md docs/Capitalization.md docs/Cat.md -docs/CatAllOf.md docs/Category.md docs/ClassModel.md docs/Client.md docs/Dog.md -docs/DogAllOf.md docs/EnumArrays.md docs/EnumClass.md docs/EnumTest.md @@ -99,15 +96,12 @@ src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java src/main/java/org/openapitools/client/model/ArrayTest.java src/main/java/org/openapitools/client/model/BigCat.java -src/main/java/org/openapitools/client/model/BigCatAllOf.java src/main/java/org/openapitools/client/model/Capitalization.java src/main/java/org/openapitools/client/model/Cat.java -src/main/java/org/openapitools/client/model/CatAllOf.java src/main/java/org/openapitools/client/model/Category.java src/main/java/org/openapitools/client/model/ClassModel.java src/main/java/org/openapitools/client/model/Client.java src/main/java/org/openapitools/client/model/Dog.java -src/main/java/org/openapitools/client/model/DogAllOf.java src/main/java/org/openapitools/client/model/EnumArrays.java src/main/java/org/openapitools/client/model/EnumClass.java src/main/java/org/openapitools/client/model/EnumTest.java diff --git a/samples/client/petstore/java/retrofit2rx3/api/openapi.yaml b/samples/client/petstore/java/retrofit2rx3/api/openapi.yaml index e7e17402f6f..dbf370f445d 100644 --- a/samples/client/petstore/java/retrofit2rx3/api/openapi.yaml +++ b/samples/client/petstore/java/retrofit2rx3/api/openapi.yaml @@ -1364,15 +1364,29 @@ components: Dog: allOf: - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Dog_allOf' + - properties: + breed: + type: string + type: object Cat: allOf: - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Cat_allOf' + - properties: + declawed: + type: boolean + type: object BigCat: allOf: - $ref: '#/components/schemas/Cat' - - $ref: '#/components/schemas/BigCat_allOf' + - properties: + kind: + enum: + - lions + - tigers + - leopards + - jaguars + type: string + type: object Animal: discriminator: propertyName: className @@ -2165,29 +2179,6 @@ components: required: - requiredFile type: object - Dog_allOf: - properties: - breed: - type: string - type: object - example: null - Cat_allOf: - properties: - declawed: - type: boolean - type: object - example: null - BigCat_allOf: - properties: - kind: - enum: - - lions - - tigers - - leopards - - jaguars - type: string - type: object - example: null securitySchemes: petstore_auth: flows: diff --git a/samples/client/petstore/java/retrofit2rx3/docs/BigCatAllOf.md b/samples/client/petstore/java/retrofit2rx3/docs/BigCatAllOf.md deleted file mode 100644 index 2bee213a607..00000000000 --- a/samples/client/petstore/java/retrofit2rx3/docs/BigCatAllOf.md +++ /dev/null @@ -1,24 +0,0 @@ - - -# BigCatAllOf - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**kind** | [**KindEnum**](#KindEnum) | | [optional] | - - - -## Enum: KindEnum - -| Name | Value | -|---- | -----| -| LIONS | "lions" | -| TIGERS | "tigers" | -| LEOPARDS | "leopards" | -| JAGUARS | "jaguars" | - - - diff --git a/samples/client/petstore/java/retrofit2rx3/docs/CatAllOf.md b/samples/client/petstore/java/retrofit2rx3/docs/CatAllOf.md deleted file mode 100644 index 926bc0abd78..00000000000 --- a/samples/client/petstore/java/retrofit2rx3/docs/CatAllOf.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# CatAllOf - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**declawed** | **Boolean** | | [optional] | - - - diff --git a/samples/client/petstore/java/retrofit2rx3/docs/DogAllOf.md b/samples/client/petstore/java/retrofit2rx3/docs/DogAllOf.md deleted file mode 100644 index d4e4ea0d548..00000000000 --- a/samples/client/petstore/java/retrofit2rx3/docs/DogAllOf.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# DogAllOf - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**breed** | **String** | | [optional] | - - - diff --git a/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/BigCatAllOf.java b/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/BigCatAllOf.java deleted file mode 100644 index dc77482df48..00000000000 --- a/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/BigCatAllOf.java +++ /dev/null @@ -1,147 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -/** - * BigCatAllOf - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class BigCatAllOf { - /** - * Gets or Sets kind - */ - @JsonAdapter(KindEnum.Adapter.class) - public enum KindEnum { - LIONS("lions"), - - TIGERS("tigers"), - - LEOPARDS("leopards"), - - JAGUARS("jaguars"); - - private String value; - - KindEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static KindEnum fromValue(String value) { - for (KindEnum b : KindEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final KindEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public KindEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return KindEnum.fromValue(value); - } - } - } - - public static final String SERIALIZED_NAME_KIND = "kind"; - @SerializedName(SERIALIZED_NAME_KIND) - private KindEnum kind; - - public BigCatAllOf() { - } - - public BigCatAllOf kind(KindEnum kind) { - - this.kind = kind; - return this; - } - - /** - * Get kind - * @return kind - **/ - @javax.annotation.Nullable - - public KindEnum getKind() { - return kind; - } - - - public void setKind(KindEnum kind) { - this.kind = kind; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BigCatAllOf bigCatAllOf = (BigCatAllOf) o; - return Objects.equals(this.kind, bigCatAllOf.kind); - } - - @Override - public int hashCode() { - return Objects.hash(kind); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BigCatAllOf {\n"); - sb.append(" kind: ").append(toIndentedString(kind)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/CatAllOf.java b/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/CatAllOf.java deleted file mode 100644 index 1af3ba94019..00000000000 --- a/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/CatAllOf.java +++ /dev/null @@ -1,96 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -/** - * CatAllOf - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CatAllOf { - public static final String SERIALIZED_NAME_DECLAWED = "declawed"; - @SerializedName(SERIALIZED_NAME_DECLAWED) - private Boolean declawed; - - public CatAllOf() { - } - - public CatAllOf declawed(Boolean declawed) { - - this.declawed = declawed; - return this; - } - - /** - * Get declawed - * @return declawed - **/ - @javax.annotation.Nullable - - public Boolean getDeclawed() { - return declawed; - } - - - public void setDeclawed(Boolean declawed) { - this.declawed = declawed; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CatAllOf catAllOf = (CatAllOf) o; - return Objects.equals(this.declawed, catAllOf.declawed); - } - - @Override - public int hashCode() { - return Objects.hash(declawed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CatAllOf {\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/DogAllOf.java b/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/DogAllOf.java deleted file mode 100644 index ba9be150d62..00000000000 --- a/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/model/DogAllOf.java +++ /dev/null @@ -1,96 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -/** - * DogAllOf - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DogAllOf { - public static final String SERIALIZED_NAME_BREED = "breed"; - @SerializedName(SERIALIZED_NAME_BREED) - private String breed; - - public DogAllOf() { - } - - public DogAllOf breed(String breed) { - - this.breed = breed; - return this; - } - - /** - * Get breed - * @return breed - **/ - @javax.annotation.Nullable - - public String getBreed() { - return breed; - } - - - public void setBreed(String breed) { - this.breed = breed; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DogAllOf dogAllOf = (DogAllOf) o; - return Objects.equals(this.breed, dogAllOf.breed); - } - - @Override - public int hashCode() { - return Objects.hash(breed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DogAllOf {\n"); - sb.append(" breed: ").append(toIndentedString(breed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/retrofit2rx3/src/test/java/org/openapitools/client/model/BigCatAllOfTest.java b/samples/client/petstore/java/retrofit2rx3/src/test/java/org/openapitools/client/model/BigCatAllOfTest.java deleted file mode 100644 index f7f725106d1..00000000000 --- a/samples/client/petstore/java/retrofit2rx3/src/test/java/org/openapitools/client/model/BigCatAllOfTest.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for BigCatAllOf - */ -public class BigCatAllOfTest { - private final BigCatAllOf model = new BigCatAllOf(); - - /** - * Model tests for BigCatAllOf - */ - @Test - public void testBigCatAllOf() { - // TODO: test BigCatAllOf - } - - /** - * Test the property 'kind' - */ - @Test - public void kindTest() { - // TODO: test kind - } - -} diff --git a/samples/client/petstore/java/retrofit2rx3/src/test/java/org/openapitools/client/model/BigCatTest.java b/samples/client/petstore/java/retrofit2rx3/src/test/java/org/openapitools/client/model/BigCatTest.java index 0cb50249725..0949e1385d8 100644 --- a/samples/client/petstore/java/retrofit2rx3/src/test/java/org/openapitools/client/model/BigCatTest.java +++ b/samples/client/petstore/java/retrofit2rx3/src/test/java/org/openapitools/client/model/BigCatTest.java @@ -18,16 +18,12 @@ import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.IOException; -import org.openapitools.client.model.BigCatAllOf; import org.openapitools.client.model.Cat; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for BigCat */ diff --git a/samples/client/petstore/java/retrofit2rx3/src/test/java/org/openapitools/client/model/CatAllOfTest.java b/samples/client/petstore/java/retrofit2rx3/src/test/java/org/openapitools/client/model/CatAllOfTest.java deleted file mode 100644 index 384ab21b773..00000000000 --- a/samples/client/petstore/java/retrofit2rx3/src/test/java/org/openapitools/client/model/CatAllOfTest.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for CatAllOf - */ -public class CatAllOfTest { - private final CatAllOf model = new CatAllOf(); - - /** - * Model tests for CatAllOf - */ - @Test - public void testCatAllOf() { - // TODO: test CatAllOf - } - - /** - * Test the property 'declawed' - */ - @Test - public void declawedTest() { - // TODO: test declawed - } - -} diff --git a/samples/client/petstore/java/retrofit2rx3/src/test/java/org/openapitools/client/model/CatTest.java b/samples/client/petstore/java/retrofit2rx3/src/test/java/org/openapitools/client/model/CatTest.java index ac7ac3c80f6..e26c6db5da9 100644 --- a/samples/client/petstore/java/retrofit2rx3/src/test/java/org/openapitools/client/model/CatTest.java +++ b/samples/client/petstore/java/retrofit2rx3/src/test/java/org/openapitools/client/model/CatTest.java @@ -23,7 +23,6 @@ import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import org.openapitools.client.model.Animal; import org.openapitools.client.model.BigCat; -import org.openapitools.client.model.CatAllOf; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; diff --git a/samples/client/petstore/java/retrofit2rx3/src/test/java/org/openapitools/client/model/DogAllOfTest.java b/samples/client/petstore/java/retrofit2rx3/src/test/java/org/openapitools/client/model/DogAllOfTest.java deleted file mode 100644 index 0d695b15a63..00000000000 --- a/samples/client/petstore/java/retrofit2rx3/src/test/java/org/openapitools/client/model/DogAllOfTest.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for DogAllOf - */ -public class DogAllOfTest { - private final DogAllOf model = new DogAllOf(); - - /** - * Model tests for DogAllOf - */ - @Test - public void testDogAllOf() { - // TODO: test DogAllOf - } - - /** - * Test the property 'breed' - */ - @Test - public void breedTest() { - // TODO: test breed - } - -} diff --git a/samples/client/petstore/java/retrofit2rx3/src/test/java/org/openapitools/client/model/DogTest.java b/samples/client/petstore/java/retrofit2rx3/src/test/java/org/openapitools/client/model/DogTest.java index 124bc99c1f1..b2e427523bc 100644 --- a/samples/client/petstore/java/retrofit2rx3/src/test/java/org/openapitools/client/model/DogTest.java +++ b/samples/client/petstore/java/retrofit2rx3/src/test/java/org/openapitools/client/model/DogTest.java @@ -22,7 +22,6 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import org.openapitools.client.model.Animal; -import org.openapitools.client.model.DogAllOf; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; diff --git a/samples/client/petstore/java/vertx-no-nullable/.openapi-generator/FILES b/samples/client/petstore/java/vertx-no-nullable/.openapi-generator/FILES index c588a14f162..594a8dee889 100644 --- a/samples/client/petstore/java/vertx-no-nullable/.openapi-generator/FILES +++ b/samples/client/petstore/java/vertx-no-nullable/.openapi-generator/FILES @@ -19,15 +19,12 @@ docs/ArrayOfArrayOfNumberOnly.md docs/ArrayOfNumberOnly.md docs/ArrayTest.md docs/BigCat.md -docs/BigCatAllOf.md docs/Capitalization.md docs/Cat.md -docs/CatAllOf.md docs/Category.md docs/ClassModel.md docs/Client.md docs/Dog.md -docs/DogAllOf.md docs/EnumArrays.md docs/EnumClass.md docs/EnumTest.md @@ -114,15 +111,12 @@ src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java src/main/java/org/openapitools/client/model/ArrayTest.java src/main/java/org/openapitools/client/model/BigCat.java -src/main/java/org/openapitools/client/model/BigCatAllOf.java src/main/java/org/openapitools/client/model/Capitalization.java src/main/java/org/openapitools/client/model/Cat.java -src/main/java/org/openapitools/client/model/CatAllOf.java src/main/java/org/openapitools/client/model/Category.java src/main/java/org/openapitools/client/model/ClassModel.java src/main/java/org/openapitools/client/model/Client.java src/main/java/org/openapitools/client/model/Dog.java -src/main/java/org/openapitools/client/model/DogAllOf.java src/main/java/org/openapitools/client/model/EnumArrays.java src/main/java/org/openapitools/client/model/EnumClass.java src/main/java/org/openapitools/client/model/EnumTest.java diff --git a/samples/client/petstore/java/vertx-no-nullable/README.md b/samples/client/petstore/java/vertx-no-nullable/README.md index bd7d21e9b39..804a5937183 100644 --- a/samples/client/petstore/java/vertx-no-nullable/README.md +++ b/samples/client/petstore/java/vertx-no-nullable/README.md @@ -167,15 +167,12 @@ Class | Method | HTTP request | Description - [ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md) - [ArrayTest](docs/ArrayTest.md) - [BigCat](docs/BigCat.md) - - [BigCatAllOf](docs/BigCatAllOf.md) - [Capitalization](docs/Capitalization.md) - [Cat](docs/Cat.md) - - [CatAllOf](docs/CatAllOf.md) - [Category](docs/Category.md) - [ClassModel](docs/ClassModel.md) - [Client](docs/Client.md) - [Dog](docs/Dog.md) - - [DogAllOf](docs/DogAllOf.md) - [EnumArrays](docs/EnumArrays.md) - [EnumClass](docs/EnumClass.md) - [EnumTest](docs/EnumTest.md) diff --git a/samples/client/petstore/java/vertx-no-nullable/api/openapi.yaml b/samples/client/petstore/java/vertx-no-nullable/api/openapi.yaml index e7e17402f6f..dbf370f445d 100644 --- a/samples/client/petstore/java/vertx-no-nullable/api/openapi.yaml +++ b/samples/client/petstore/java/vertx-no-nullable/api/openapi.yaml @@ -1364,15 +1364,29 @@ components: Dog: allOf: - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Dog_allOf' + - properties: + breed: + type: string + type: object Cat: allOf: - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Cat_allOf' + - properties: + declawed: + type: boolean + type: object BigCat: allOf: - $ref: '#/components/schemas/Cat' - - $ref: '#/components/schemas/BigCat_allOf' + - properties: + kind: + enum: + - lions + - tigers + - leopards + - jaguars + type: string + type: object Animal: discriminator: propertyName: className @@ -2165,29 +2179,6 @@ components: required: - requiredFile type: object - Dog_allOf: - properties: - breed: - type: string - type: object - example: null - Cat_allOf: - properties: - declawed: - type: boolean - type: object - example: null - BigCat_allOf: - properties: - kind: - enum: - - lions - - tigers - - leopards - - jaguars - type: string - type: object - example: null securitySchemes: petstore_auth: flows: diff --git a/samples/client/petstore/java/vertx-no-nullable/docs/BigCatAllOf.md b/samples/client/petstore/java/vertx-no-nullable/docs/BigCatAllOf.md deleted file mode 100644 index 2bee213a607..00000000000 --- a/samples/client/petstore/java/vertx-no-nullable/docs/BigCatAllOf.md +++ /dev/null @@ -1,24 +0,0 @@ - - -# BigCatAllOf - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**kind** | [**KindEnum**](#KindEnum) | | [optional] | - - - -## Enum: KindEnum - -| Name | Value | -|---- | -----| -| LIONS | "lions" | -| TIGERS | "tigers" | -| LEOPARDS | "leopards" | -| JAGUARS | "jaguars" | - - - diff --git a/samples/client/petstore/java/vertx-no-nullable/docs/CatAllOf.md b/samples/client/petstore/java/vertx-no-nullable/docs/CatAllOf.md deleted file mode 100644 index 926bc0abd78..00000000000 --- a/samples/client/petstore/java/vertx-no-nullable/docs/CatAllOf.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# CatAllOf - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**declawed** | **Boolean** | | [optional] | - - - diff --git a/samples/client/petstore/java/vertx-no-nullable/docs/DogAllOf.md b/samples/client/petstore/java/vertx-no-nullable/docs/DogAllOf.md deleted file mode 100644 index d4e4ea0d548..00000000000 --- a/samples/client/petstore/java/vertx-no-nullable/docs/DogAllOf.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# DogAllOf - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**breed** | **String** | | [optional] | - - - diff --git a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/BigCatAllOf.java b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/BigCatAllOf.java deleted file mode 100644 index e357e3111ca..00000000000 --- a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/BigCatAllOf.java +++ /dev/null @@ -1,143 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** - * BigCatAllOf - */ -@JsonPropertyOrder({ - BigCatAllOf.JSON_PROPERTY_KIND -}) -@JsonTypeName("BigCat_allOf") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class BigCatAllOf { - /** - * Gets or Sets kind - */ - public enum KindEnum { - LIONS("lions"), - - TIGERS("tigers"), - - LEOPARDS("leopards"), - - JAGUARS("jaguars"); - - private String value; - - KindEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static KindEnum fromValue(String value) { - for (KindEnum b : KindEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - public static final String JSON_PROPERTY_KIND = "kind"; - private KindEnum kind; - - public BigCatAllOf() { - } - - public BigCatAllOf kind(KindEnum kind) { - - this.kind = kind; - return this; - } - - /** - * Get kind - * @return kind - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_KIND) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public KindEnum getKind() { - return kind; - } - - - @JsonProperty(JSON_PROPERTY_KIND) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setKind(KindEnum kind) { - this.kind = kind; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BigCatAllOf bigCatAllOf = (BigCatAllOf) o; - return Objects.equals(this.kind, bigCatAllOf.kind); - } - - @Override - public int hashCode() { - return Objects.hash(kind); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BigCatAllOf {\n"); - sb.append(" kind: ").append(toIndentedString(kind)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/CatAllOf.java b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/CatAllOf.java deleted file mode 100644 index 7c404d48482..00000000000 --- a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/CatAllOf.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** - * CatAllOf - */ -@JsonPropertyOrder({ - CatAllOf.JSON_PROPERTY_DECLAWED -}) -@JsonTypeName("Cat_allOf") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CatAllOf { - public static final String JSON_PROPERTY_DECLAWED = "declawed"; - private Boolean declawed; - - public CatAllOf() { - } - - public CatAllOf declawed(Boolean declawed) { - - this.declawed = declawed; - return this; - } - - /** - * Get declawed - * @return declawed - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DECLAWED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Boolean getDeclawed() { - return declawed; - } - - - @JsonProperty(JSON_PROPERTY_DECLAWED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDeclawed(Boolean declawed) { - this.declawed = declawed; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CatAllOf catAllOf = (CatAllOf) o; - return Objects.equals(this.declawed, catAllOf.declawed); - } - - @Override - public int hashCode() { - return Objects.hash(declawed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CatAllOf {\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/DogAllOf.java b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/DogAllOf.java deleted file mode 100644 index 2978c34e2cc..00000000000 --- a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/model/DogAllOf.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** - * DogAllOf - */ -@JsonPropertyOrder({ - DogAllOf.JSON_PROPERTY_BREED -}) -@JsonTypeName("Dog_allOf") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DogAllOf { - public static final String JSON_PROPERTY_BREED = "breed"; - private String breed; - - public DogAllOf() { - } - - public DogAllOf breed(String breed) { - - this.breed = breed; - return this; - } - - /** - * Get breed - * @return breed - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_BREED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getBreed() { - return breed; - } - - - @JsonProperty(JSON_PROPERTY_BREED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setBreed(String breed) { - this.breed = breed; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DogAllOf dogAllOf = (DogAllOf) o; - return Objects.equals(this.breed, dogAllOf.breed); - } - - @Override - public int hashCode() { - return Objects.hash(breed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DogAllOf {\n"); - sb.append(" breed: ").append(toIndentedString(breed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/vertx-no-nullable/src/test/java/org/openapitools/client/model/BigCatAllOfTest.java b/samples/client/petstore/java/vertx-no-nullable/src/test/java/org/openapitools/client/model/BigCatAllOfTest.java deleted file mode 100644 index 83346220fd0..00000000000 --- a/samples/client/petstore/java/vertx-no-nullable/src/test/java/org/openapitools/client/model/BigCatAllOfTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for BigCatAllOf - */ -public class BigCatAllOfTest { - private final BigCatAllOf model = new BigCatAllOf(); - - /** - * Model tests for BigCatAllOf - */ - @Test - public void testBigCatAllOf() { - // TODO: test BigCatAllOf - } - - /** - * Test the property 'kind' - */ - @Test - public void kindTest() { - // TODO: test kind - } - -} diff --git a/samples/client/petstore/java/vertx-no-nullable/src/test/java/org/openapitools/client/model/BigCatTest.java b/samples/client/petstore/java/vertx-no-nullable/src/test/java/org/openapitools/client/model/BigCatTest.java index c9c1f264e0e..765bd150512 100644 --- a/samples/client/petstore/java/vertx-no-nullable/src/test/java/org/openapitools/client/model/BigCatTest.java +++ b/samples/client/petstore/java/vertx-no-nullable/src/test/java/org/openapitools/client/model/BigCatTest.java @@ -13,6 +13,7 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -20,15 +21,11 @@ import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.openapitools.client.model.BigCatAllOf; import org.openapitools.client.model.Cat; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for BigCat */ diff --git a/samples/client/petstore/java/vertx-no-nullable/src/test/java/org/openapitools/client/model/CatAllOfTest.java b/samples/client/petstore/java/vertx-no-nullable/src/test/java/org/openapitools/client/model/CatAllOfTest.java deleted file mode 100644 index 7884c04c72e..00000000000 --- a/samples/client/petstore/java/vertx-no-nullable/src/test/java/org/openapitools/client/model/CatAllOfTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for CatAllOf - */ -public class CatAllOfTest { - private final CatAllOf model = new CatAllOf(); - - /** - * Model tests for CatAllOf - */ - @Test - public void testCatAllOf() { - // TODO: test CatAllOf - } - - /** - * Test the property 'declawed' - */ - @Test - public void declawedTest() { - // TODO: test declawed - } - -} diff --git a/samples/client/petstore/java/vertx-no-nullable/src/test/java/org/openapitools/client/model/DogAllOfTest.java b/samples/client/petstore/java/vertx-no-nullable/src/test/java/org/openapitools/client/model/DogAllOfTest.java deleted file mode 100644 index 0ac24507de6..00000000000 --- a/samples/client/petstore/java/vertx-no-nullable/src/test/java/org/openapitools/client/model/DogAllOfTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for DogAllOf - */ -public class DogAllOfTest { - private final DogAllOf model = new DogAllOf(); - - /** - * Model tests for DogAllOf - */ - @Test - public void testDogAllOf() { - // TODO: test DogAllOf - } - - /** - * Test the property 'breed' - */ - @Test - public void breedTest() { - // TODO: test breed - } - -} diff --git a/samples/client/petstore/java/vertx/.openapi-generator/FILES b/samples/client/petstore/java/vertx/.openapi-generator/FILES index c588a14f162..594a8dee889 100644 --- a/samples/client/petstore/java/vertx/.openapi-generator/FILES +++ b/samples/client/petstore/java/vertx/.openapi-generator/FILES @@ -19,15 +19,12 @@ docs/ArrayOfArrayOfNumberOnly.md docs/ArrayOfNumberOnly.md docs/ArrayTest.md docs/BigCat.md -docs/BigCatAllOf.md docs/Capitalization.md docs/Cat.md -docs/CatAllOf.md docs/Category.md docs/ClassModel.md docs/Client.md docs/Dog.md -docs/DogAllOf.md docs/EnumArrays.md docs/EnumClass.md docs/EnumTest.md @@ -114,15 +111,12 @@ src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java src/main/java/org/openapitools/client/model/ArrayTest.java src/main/java/org/openapitools/client/model/BigCat.java -src/main/java/org/openapitools/client/model/BigCatAllOf.java src/main/java/org/openapitools/client/model/Capitalization.java src/main/java/org/openapitools/client/model/Cat.java -src/main/java/org/openapitools/client/model/CatAllOf.java src/main/java/org/openapitools/client/model/Category.java src/main/java/org/openapitools/client/model/ClassModel.java src/main/java/org/openapitools/client/model/Client.java src/main/java/org/openapitools/client/model/Dog.java -src/main/java/org/openapitools/client/model/DogAllOf.java src/main/java/org/openapitools/client/model/EnumArrays.java src/main/java/org/openapitools/client/model/EnumClass.java src/main/java/org/openapitools/client/model/EnumTest.java diff --git a/samples/client/petstore/java/vertx/README.md b/samples/client/petstore/java/vertx/README.md index 72bb5908746..a29044f48a6 100644 --- a/samples/client/petstore/java/vertx/README.md +++ b/samples/client/petstore/java/vertx/README.md @@ -167,15 +167,12 @@ Class | Method | HTTP request | Description - [ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md) - [ArrayTest](docs/ArrayTest.md) - [BigCat](docs/BigCat.md) - - [BigCatAllOf](docs/BigCatAllOf.md) - [Capitalization](docs/Capitalization.md) - [Cat](docs/Cat.md) - - [CatAllOf](docs/CatAllOf.md) - [Category](docs/Category.md) - [ClassModel](docs/ClassModel.md) - [Client](docs/Client.md) - [Dog](docs/Dog.md) - - [DogAllOf](docs/DogAllOf.md) - [EnumArrays](docs/EnumArrays.md) - [EnumClass](docs/EnumClass.md) - [EnumTest](docs/EnumTest.md) diff --git a/samples/client/petstore/java/vertx/api/openapi.yaml b/samples/client/petstore/java/vertx/api/openapi.yaml index e7e17402f6f..dbf370f445d 100644 --- a/samples/client/petstore/java/vertx/api/openapi.yaml +++ b/samples/client/petstore/java/vertx/api/openapi.yaml @@ -1364,15 +1364,29 @@ components: Dog: allOf: - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Dog_allOf' + - properties: + breed: + type: string + type: object Cat: allOf: - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Cat_allOf' + - properties: + declawed: + type: boolean + type: object BigCat: allOf: - $ref: '#/components/schemas/Cat' - - $ref: '#/components/schemas/BigCat_allOf' + - properties: + kind: + enum: + - lions + - tigers + - leopards + - jaguars + type: string + type: object Animal: discriminator: propertyName: className @@ -2165,29 +2179,6 @@ components: required: - requiredFile type: object - Dog_allOf: - properties: - breed: - type: string - type: object - example: null - Cat_allOf: - properties: - declawed: - type: boolean - type: object - example: null - BigCat_allOf: - properties: - kind: - enum: - - lions - - tigers - - leopards - - jaguars - type: string - type: object - example: null securitySchemes: petstore_auth: flows: diff --git a/samples/client/petstore/java/vertx/docs/BigCatAllOf.md b/samples/client/petstore/java/vertx/docs/BigCatAllOf.md deleted file mode 100644 index 2bee213a607..00000000000 --- a/samples/client/petstore/java/vertx/docs/BigCatAllOf.md +++ /dev/null @@ -1,24 +0,0 @@ - - -# BigCatAllOf - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**kind** | [**KindEnum**](#KindEnum) | | [optional] | - - - -## Enum: KindEnum - -| Name | Value | -|---- | -----| -| LIONS | "lions" | -| TIGERS | "tigers" | -| LEOPARDS | "leopards" | -| JAGUARS | "jaguars" | - - - diff --git a/samples/client/petstore/java/vertx/docs/CatAllOf.md b/samples/client/petstore/java/vertx/docs/CatAllOf.md deleted file mode 100644 index 926bc0abd78..00000000000 --- a/samples/client/petstore/java/vertx/docs/CatAllOf.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# CatAllOf - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**declawed** | **Boolean** | | [optional] | - - - diff --git a/samples/client/petstore/java/vertx/docs/DogAllOf.md b/samples/client/petstore/java/vertx/docs/DogAllOf.md deleted file mode 100644 index d4e4ea0d548..00000000000 --- a/samples/client/petstore/java/vertx/docs/DogAllOf.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# DogAllOf - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**breed** | **String** | | [optional] | - - - diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/BigCatAllOf.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/BigCatAllOf.java deleted file mode 100644 index e357e3111ca..00000000000 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/BigCatAllOf.java +++ /dev/null @@ -1,143 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** - * BigCatAllOf - */ -@JsonPropertyOrder({ - BigCatAllOf.JSON_PROPERTY_KIND -}) -@JsonTypeName("BigCat_allOf") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class BigCatAllOf { - /** - * Gets or Sets kind - */ - public enum KindEnum { - LIONS("lions"), - - TIGERS("tigers"), - - LEOPARDS("leopards"), - - JAGUARS("jaguars"); - - private String value; - - KindEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static KindEnum fromValue(String value) { - for (KindEnum b : KindEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - public static final String JSON_PROPERTY_KIND = "kind"; - private KindEnum kind; - - public BigCatAllOf() { - } - - public BigCatAllOf kind(KindEnum kind) { - - this.kind = kind; - return this; - } - - /** - * Get kind - * @return kind - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_KIND) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public KindEnum getKind() { - return kind; - } - - - @JsonProperty(JSON_PROPERTY_KIND) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setKind(KindEnum kind) { - this.kind = kind; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BigCatAllOf bigCatAllOf = (BigCatAllOf) o; - return Objects.equals(this.kind, bigCatAllOf.kind); - } - - @Override - public int hashCode() { - return Objects.hash(kind); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BigCatAllOf {\n"); - sb.append(" kind: ").append(toIndentedString(kind)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/CatAllOf.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/CatAllOf.java deleted file mode 100644 index 7c404d48482..00000000000 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/CatAllOf.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** - * CatAllOf - */ -@JsonPropertyOrder({ - CatAllOf.JSON_PROPERTY_DECLAWED -}) -@JsonTypeName("Cat_allOf") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CatAllOf { - public static final String JSON_PROPERTY_DECLAWED = "declawed"; - private Boolean declawed; - - public CatAllOf() { - } - - public CatAllOf declawed(Boolean declawed) { - - this.declawed = declawed; - return this; - } - - /** - * Get declawed - * @return declawed - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DECLAWED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Boolean getDeclawed() { - return declawed; - } - - - @JsonProperty(JSON_PROPERTY_DECLAWED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDeclawed(Boolean declawed) { - this.declawed = declawed; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CatAllOf catAllOf = (CatAllOf) o; - return Objects.equals(this.declawed, catAllOf.declawed); - } - - @Override - public int hashCode() { - return Objects.hash(declawed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CatAllOf {\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/DogAllOf.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/DogAllOf.java deleted file mode 100644 index 2978c34e2cc..00000000000 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/DogAllOf.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** - * DogAllOf - */ -@JsonPropertyOrder({ - DogAllOf.JSON_PROPERTY_BREED -}) -@JsonTypeName("Dog_allOf") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DogAllOf { - public static final String JSON_PROPERTY_BREED = "breed"; - private String breed; - - public DogAllOf() { - } - - public DogAllOf breed(String breed) { - - this.breed = breed; - return this; - } - - /** - * Get breed - * @return breed - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_BREED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getBreed() { - return breed; - } - - - @JsonProperty(JSON_PROPERTY_BREED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setBreed(String breed) { - this.breed = breed; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DogAllOf dogAllOf = (DogAllOf) o; - return Objects.equals(this.breed, dogAllOf.breed); - } - - @Override - public int hashCode() { - return Objects.hash(breed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DogAllOf {\n"); - sb.append(" breed: ").append(toIndentedString(breed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/BigCatAllOfTest.java b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/BigCatAllOfTest.java deleted file mode 100644 index 8e291df45f1..00000000000 --- a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/BigCatAllOfTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for BigCatAllOf - */ -public class BigCatAllOfTest { - private final BigCatAllOf model = new BigCatAllOf(); - - /** - * Model tests for BigCatAllOf - */ - @Test - public void testBigCatAllOf() { - // TODO: test BigCatAllOf - } - - /** - * Test the property 'kind' - */ - @Test - public void kindTest() { - // TODO: test kind - } - -} diff --git a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/BigCatTest.java b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/BigCatTest.java index f6c4621c9ea..765bd150512 100644 --- a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/BigCatTest.java +++ b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/BigCatTest.java @@ -26,7 +26,6 @@ import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; - /** * Model tests for BigCat */ diff --git a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/CatAllOfTest.java b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/CatAllOfTest.java deleted file mode 100644 index 269bdbe11b7..00000000000 --- a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/CatAllOfTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for CatAllOf - */ -public class CatAllOfTest { - private final CatAllOf model = new CatAllOf(); - - /** - * Model tests for CatAllOf - */ - @Test - public void testCatAllOf() { - // TODO: test CatAllOf - } - - /** - * Test the property 'declawed' - */ - @Test - public void declawedTest() { - // TODO: test declawed - } - -} diff --git a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/DogAllOfTest.java b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/DogAllOfTest.java deleted file mode 100644 index dfa91c25ec8..00000000000 --- a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/model/DogAllOfTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for DogAllOf - */ -public class DogAllOfTest { - private final DogAllOf model = new DogAllOf(); - - /** - * Model tests for DogAllOf - */ - @Test - public void testDogAllOf() { - // TODO: test DogAllOf - } - - /** - * Test the property 'breed' - */ - @Test - public void breedTest() { - // TODO: test breed - } - -} diff --git a/samples/client/petstore/java/webclient-jakarta/.openapi-generator/FILES b/samples/client/petstore/java/webclient-jakarta/.openapi-generator/FILES index c4b86386d00..7b091f23a80 100644 --- a/samples/client/petstore/java/webclient-jakarta/.openapi-generator/FILES +++ b/samples/client/petstore/java/webclient-jakarta/.openapi-generator/FILES @@ -14,14 +14,12 @@ docs/ArrayOfNumberOnly.md docs/ArrayTest.md docs/Capitalization.md docs/Cat.md -docs/CatAllOf.md docs/Category.md docs/ClassModel.md docs/Client.md docs/DefaultApi.md docs/DeprecatedObject.md docs/Dog.md -docs/DogAllOf.md docs/EnumArrays.md docs/EnumClass.md docs/EnumTest.md @@ -97,13 +95,11 @@ src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java src/main/java/org/openapitools/client/model/ArrayTest.java src/main/java/org/openapitools/client/model/Capitalization.java src/main/java/org/openapitools/client/model/Cat.java -src/main/java/org/openapitools/client/model/CatAllOf.java src/main/java/org/openapitools/client/model/Category.java src/main/java/org/openapitools/client/model/ClassModel.java src/main/java/org/openapitools/client/model/Client.java src/main/java/org/openapitools/client/model/DeprecatedObject.java src/main/java/org/openapitools/client/model/Dog.java -src/main/java/org/openapitools/client/model/DogAllOf.java src/main/java/org/openapitools/client/model/EnumArrays.java src/main/java/org/openapitools/client/model/EnumClass.java src/main/java/org/openapitools/client/model/EnumTest.java diff --git a/samples/client/petstore/java/webclient-jakarta/README.md b/samples/client/petstore/java/webclient-jakarta/README.md index fdaeea4460b..11cf41560c8 100644 --- a/samples/client/petstore/java/webclient-jakarta/README.md +++ b/samples/client/petstore/java/webclient-jakarta/README.md @@ -167,13 +167,11 @@ Class | Method | HTTP request | Description - [ArrayTest](docs/ArrayTest.md) - [Capitalization](docs/Capitalization.md) - [Cat](docs/Cat.md) - - [CatAllOf](docs/CatAllOf.md) - [Category](docs/Category.md) - [ClassModel](docs/ClassModel.md) - [Client](docs/Client.md) - [DeprecatedObject](docs/DeprecatedObject.md) - [Dog](docs/Dog.md) - - [DogAllOf](docs/DogAllOf.md) - [EnumArrays](docs/EnumArrays.md) - [EnumClass](docs/EnumClass.md) - [EnumTest](docs/EnumTest.md) diff --git a/samples/client/petstore/java/webclient-jakarta/api/openapi.yaml b/samples/client/petstore/java/webclient-jakarta/api/openapi.yaml index 80e871590a3..9f0affe779f 100644 --- a/samples/client/petstore/java/webclient-jakarta/api/openapi.yaml +++ b/samples/client/petstore/java/webclient-jakarta/api/openapi.yaml @@ -1515,11 +1515,17 @@ components: Dog: allOf: - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Dog_allOf' + - properties: + breed: + type: string + type: object Cat: allOf: - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Cat_allOf' + - properties: + declawed: + type: boolean + type: object Animal: discriminator: mapping: @@ -2159,18 +2165,6 @@ components: required: - requiredFile type: object - Dog_allOf: - properties: - breed: - type: string - type: object - example: null - Cat_allOf: - properties: - declawed: - type: boolean - type: object - example: null securitySchemes: petstore_auth: flows: diff --git a/samples/client/petstore/java/webclient-jakarta/docs/CatAllOf.md b/samples/client/petstore/java/webclient-jakarta/docs/CatAllOf.md deleted file mode 100644 index 926bc0abd78..00000000000 --- a/samples/client/petstore/java/webclient-jakarta/docs/CatAllOf.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# CatAllOf - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**declawed** | **Boolean** | | [optional] | - - - diff --git a/samples/client/petstore/java/webclient-jakarta/docs/DogAllOf.md b/samples/client/petstore/java/webclient-jakarta/docs/DogAllOf.md deleted file mode 100644 index d4e4ea0d548..00000000000 --- a/samples/client/petstore/java/webclient-jakarta/docs/DogAllOf.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# DogAllOf - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**breed** | **String** | | [optional] | - - - diff --git a/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/CatAllOf.java b/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/CatAllOf.java deleted file mode 100644 index 917ad5bc1d1..00000000000 --- a/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/CatAllOf.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** - * CatAllOf - */ -@JsonPropertyOrder({ - CatAllOf.JSON_PROPERTY_DECLAWED -}) -@JsonTypeName("Cat_allOf") -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CatAllOf { - public static final String JSON_PROPERTY_DECLAWED = "declawed"; - private Boolean declawed; - - public CatAllOf() { - } - - public CatAllOf declawed(Boolean declawed) { - - this.declawed = declawed; - return this; - } - - /** - * Get declawed - * @return declawed - **/ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DECLAWED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Boolean getDeclawed() { - return declawed; - } - - - @JsonProperty(JSON_PROPERTY_DECLAWED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDeclawed(Boolean declawed) { - this.declawed = declawed; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CatAllOf catAllOf = (CatAllOf) o; - return Objects.equals(this.declawed, catAllOf.declawed); - } - - @Override - public int hashCode() { - return Objects.hash(declawed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CatAllOf {\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/DogAllOf.java b/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/DogAllOf.java deleted file mode 100644 index fe797b69a73..00000000000 --- a/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/DogAllOf.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** - * DogAllOf - */ -@JsonPropertyOrder({ - DogAllOf.JSON_PROPERTY_BREED -}) -@JsonTypeName("Dog_allOf") -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DogAllOf { - public static final String JSON_PROPERTY_BREED = "breed"; - private String breed; - - public DogAllOf() { - } - - public DogAllOf breed(String breed) { - - this.breed = breed; - return this; - } - - /** - * Get breed - * @return breed - **/ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_BREED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getBreed() { - return breed; - } - - - @JsonProperty(JSON_PROPERTY_BREED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setBreed(String breed) { - this.breed = breed; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DogAllOf dogAllOf = (DogAllOf) o; - return Objects.equals(this.breed, dogAllOf.breed); - } - - @Override - public int hashCode() { - return Objects.hash(breed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DogAllOf {\n"); - sb.append(" breed: ").append(toIndentedString(breed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/webclient-jakarta/src/test/java/org/openapitools/client/model/CatAllOfTest.java b/samples/client/petstore/java/webclient-jakarta/src/test/java/org/openapitools/client/model/CatAllOfTest.java deleted file mode 100644 index 269bdbe11b7..00000000000 --- a/samples/client/petstore/java/webclient-jakarta/src/test/java/org/openapitools/client/model/CatAllOfTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for CatAllOf - */ -public class CatAllOfTest { - private final CatAllOf model = new CatAllOf(); - - /** - * Model tests for CatAllOf - */ - @Test - public void testCatAllOf() { - // TODO: test CatAllOf - } - - /** - * Test the property 'declawed' - */ - @Test - public void declawedTest() { - // TODO: test declawed - } - -} diff --git a/samples/client/petstore/java/webclient-jakarta/src/test/java/org/openapitools/client/model/DogAllOfTest.java b/samples/client/petstore/java/webclient-jakarta/src/test/java/org/openapitools/client/model/DogAllOfTest.java deleted file mode 100644 index dfa91c25ec8..00000000000 --- a/samples/client/petstore/java/webclient-jakarta/src/test/java/org/openapitools/client/model/DogAllOfTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for DogAllOf - */ -public class DogAllOfTest { - private final DogAllOf model = new DogAllOf(); - - /** - * Model tests for DogAllOf - */ - @Test - public void testDogAllOf() { - // TODO: test DogAllOf - } - - /** - * Test the property 'breed' - */ - @Test - public void breedTest() { - // TODO: test breed - } - -} diff --git a/samples/client/petstore/java/webclient-swagger2/.openapi-generator/FILES b/samples/client/petstore/java/webclient-swagger2/.openapi-generator/FILES index c4b86386d00..7b091f23a80 100644 --- a/samples/client/petstore/java/webclient-swagger2/.openapi-generator/FILES +++ b/samples/client/petstore/java/webclient-swagger2/.openapi-generator/FILES @@ -14,14 +14,12 @@ docs/ArrayOfNumberOnly.md docs/ArrayTest.md docs/Capitalization.md docs/Cat.md -docs/CatAllOf.md docs/Category.md docs/ClassModel.md docs/Client.md docs/DefaultApi.md docs/DeprecatedObject.md docs/Dog.md -docs/DogAllOf.md docs/EnumArrays.md docs/EnumClass.md docs/EnumTest.md @@ -97,13 +95,11 @@ src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java src/main/java/org/openapitools/client/model/ArrayTest.java src/main/java/org/openapitools/client/model/Capitalization.java src/main/java/org/openapitools/client/model/Cat.java -src/main/java/org/openapitools/client/model/CatAllOf.java src/main/java/org/openapitools/client/model/Category.java src/main/java/org/openapitools/client/model/ClassModel.java src/main/java/org/openapitools/client/model/Client.java src/main/java/org/openapitools/client/model/DeprecatedObject.java src/main/java/org/openapitools/client/model/Dog.java -src/main/java/org/openapitools/client/model/DogAllOf.java src/main/java/org/openapitools/client/model/EnumArrays.java src/main/java/org/openapitools/client/model/EnumClass.java src/main/java/org/openapitools/client/model/EnumTest.java diff --git a/samples/client/petstore/java/webclient-swagger2/README.md b/samples/client/petstore/java/webclient-swagger2/README.md index fdaeea4460b..11cf41560c8 100644 --- a/samples/client/petstore/java/webclient-swagger2/README.md +++ b/samples/client/petstore/java/webclient-swagger2/README.md @@ -167,13 +167,11 @@ Class | Method | HTTP request | Description - [ArrayTest](docs/ArrayTest.md) - [Capitalization](docs/Capitalization.md) - [Cat](docs/Cat.md) - - [CatAllOf](docs/CatAllOf.md) - [Category](docs/Category.md) - [ClassModel](docs/ClassModel.md) - [Client](docs/Client.md) - [DeprecatedObject](docs/DeprecatedObject.md) - [Dog](docs/Dog.md) - - [DogAllOf](docs/DogAllOf.md) - [EnumArrays](docs/EnumArrays.md) - [EnumClass](docs/EnumClass.md) - [EnumTest](docs/EnumTest.md) diff --git a/samples/client/petstore/java/webclient-swagger2/api/openapi.yaml b/samples/client/petstore/java/webclient-swagger2/api/openapi.yaml index 80e871590a3..9f0affe779f 100644 --- a/samples/client/petstore/java/webclient-swagger2/api/openapi.yaml +++ b/samples/client/petstore/java/webclient-swagger2/api/openapi.yaml @@ -1515,11 +1515,17 @@ components: Dog: allOf: - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Dog_allOf' + - properties: + breed: + type: string + type: object Cat: allOf: - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Cat_allOf' + - properties: + declawed: + type: boolean + type: object Animal: discriminator: mapping: @@ -2159,18 +2165,6 @@ components: required: - requiredFile type: object - Dog_allOf: - properties: - breed: - type: string - type: object - example: null - Cat_allOf: - properties: - declawed: - type: boolean - type: object - example: null securitySchemes: petstore_auth: flows: diff --git a/samples/client/petstore/java/webclient-swagger2/docs/CatAllOf.md b/samples/client/petstore/java/webclient-swagger2/docs/CatAllOf.md deleted file mode 100644 index 926bc0abd78..00000000000 --- a/samples/client/petstore/java/webclient-swagger2/docs/CatAllOf.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# CatAllOf - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**declawed** | **Boolean** | | [optional] | - - - diff --git a/samples/client/petstore/java/webclient-swagger2/docs/DogAllOf.md b/samples/client/petstore/java/webclient-swagger2/docs/DogAllOf.md deleted file mode 100644 index d4e4ea0d548..00000000000 --- a/samples/client/petstore/java/webclient-swagger2/docs/DogAllOf.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# DogAllOf - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**breed** | **String** | | [optional] | - - - diff --git a/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/CatAllOf.java b/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/CatAllOf.java deleted file mode 100644 index 1fb48ae5d04..00000000000 --- a/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/CatAllOf.java +++ /dev/null @@ -1,106 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.v3.oas.annotations.media.Schema; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** - * CatAllOf - */ -@JsonPropertyOrder({ - CatAllOf.JSON_PROPERTY_DECLAWED -}) -@JsonTypeName("Cat_allOf") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CatAllOf { - public static final String JSON_PROPERTY_DECLAWED = "declawed"; - private Boolean declawed; - - public CatAllOf() { - } - - public CatAllOf declawed(Boolean declawed) { - - this.declawed = declawed; - return this; - } - - /** - * Get declawed - * @return declawed - **/ - @javax.annotation.Nullable - @Schema(requiredMode = Schema.RequiredMode.NOT_REQUIRED, description = "") - @JsonProperty(JSON_PROPERTY_DECLAWED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Boolean getDeclawed() { - return declawed; - } - - - @JsonProperty(JSON_PROPERTY_DECLAWED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDeclawed(Boolean declawed) { - this.declawed = declawed; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CatAllOf catAllOf = (CatAllOf) o; - return Objects.equals(this.declawed, catAllOf.declawed); - } - - @Override - public int hashCode() { - return Objects.hash(declawed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CatAllOf {\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/DogAllOf.java b/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/DogAllOf.java deleted file mode 100644 index 3811ce9add2..00000000000 --- a/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/DogAllOf.java +++ /dev/null @@ -1,106 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.v3.oas.annotations.media.Schema; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** - * DogAllOf - */ -@JsonPropertyOrder({ - DogAllOf.JSON_PROPERTY_BREED -}) -@JsonTypeName("Dog_allOf") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DogAllOf { - public static final String JSON_PROPERTY_BREED = "breed"; - private String breed; - - public DogAllOf() { - } - - public DogAllOf breed(String breed) { - - this.breed = breed; - return this; - } - - /** - * Get breed - * @return breed - **/ - @javax.annotation.Nullable - @Schema(requiredMode = Schema.RequiredMode.NOT_REQUIRED, description = "") - @JsonProperty(JSON_PROPERTY_BREED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getBreed() { - return breed; - } - - - @JsonProperty(JSON_PROPERTY_BREED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setBreed(String breed) { - this.breed = breed; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DogAllOf dogAllOf = (DogAllOf) o; - return Objects.equals(this.breed, dogAllOf.breed); - } - - @Override - public int hashCode() { - return Objects.hash(breed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DogAllOf {\n"); - sb.append(" breed: ").append(toIndentedString(breed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/webclient-swagger2/src/test/java/org/openapitools/client/model/CatAllOfTest.java b/samples/client/petstore/java/webclient-swagger2/src/test/java/org/openapitools/client/model/CatAllOfTest.java deleted file mode 100644 index 269bdbe11b7..00000000000 --- a/samples/client/petstore/java/webclient-swagger2/src/test/java/org/openapitools/client/model/CatAllOfTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for CatAllOf - */ -public class CatAllOfTest { - private final CatAllOf model = new CatAllOf(); - - /** - * Model tests for CatAllOf - */ - @Test - public void testCatAllOf() { - // TODO: test CatAllOf - } - - /** - * Test the property 'declawed' - */ - @Test - public void declawedTest() { - // TODO: test declawed - } - -} diff --git a/samples/client/petstore/java/webclient-swagger2/src/test/java/org/openapitools/client/model/DogAllOfTest.java b/samples/client/petstore/java/webclient-swagger2/src/test/java/org/openapitools/client/model/DogAllOfTest.java deleted file mode 100644 index dfa91c25ec8..00000000000 --- a/samples/client/petstore/java/webclient-swagger2/src/test/java/org/openapitools/client/model/DogAllOfTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for DogAllOf - */ -public class DogAllOfTest { - private final DogAllOf model = new DogAllOf(); - - /** - * Model tests for DogAllOf - */ - @Test - public void testDogAllOf() { - // TODO: test DogAllOf - } - - /** - * Test the property 'breed' - */ - @Test - public void breedTest() { - // TODO: test breed - } - -} diff --git a/samples/client/petstore/java/webclient/.openapi-generator/FILES b/samples/client/petstore/java/webclient/.openapi-generator/FILES index c4b86386d00..7b091f23a80 100644 --- a/samples/client/petstore/java/webclient/.openapi-generator/FILES +++ b/samples/client/petstore/java/webclient/.openapi-generator/FILES @@ -14,14 +14,12 @@ docs/ArrayOfNumberOnly.md docs/ArrayTest.md docs/Capitalization.md docs/Cat.md -docs/CatAllOf.md docs/Category.md docs/ClassModel.md docs/Client.md docs/DefaultApi.md docs/DeprecatedObject.md docs/Dog.md -docs/DogAllOf.md docs/EnumArrays.md docs/EnumClass.md docs/EnumTest.md @@ -97,13 +95,11 @@ src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java src/main/java/org/openapitools/client/model/ArrayTest.java src/main/java/org/openapitools/client/model/Capitalization.java src/main/java/org/openapitools/client/model/Cat.java -src/main/java/org/openapitools/client/model/CatAllOf.java src/main/java/org/openapitools/client/model/Category.java src/main/java/org/openapitools/client/model/ClassModel.java src/main/java/org/openapitools/client/model/Client.java src/main/java/org/openapitools/client/model/DeprecatedObject.java src/main/java/org/openapitools/client/model/Dog.java -src/main/java/org/openapitools/client/model/DogAllOf.java src/main/java/org/openapitools/client/model/EnumArrays.java src/main/java/org/openapitools/client/model/EnumClass.java src/main/java/org/openapitools/client/model/EnumTest.java diff --git a/samples/client/petstore/java/webclient/README.md b/samples/client/petstore/java/webclient/README.md index fdaeea4460b..11cf41560c8 100644 --- a/samples/client/petstore/java/webclient/README.md +++ b/samples/client/petstore/java/webclient/README.md @@ -167,13 +167,11 @@ Class | Method | HTTP request | Description - [ArrayTest](docs/ArrayTest.md) - [Capitalization](docs/Capitalization.md) - [Cat](docs/Cat.md) - - [CatAllOf](docs/CatAllOf.md) - [Category](docs/Category.md) - [ClassModel](docs/ClassModel.md) - [Client](docs/Client.md) - [DeprecatedObject](docs/DeprecatedObject.md) - [Dog](docs/Dog.md) - - [DogAllOf](docs/DogAllOf.md) - [EnumArrays](docs/EnumArrays.md) - [EnumClass](docs/EnumClass.md) - [EnumTest](docs/EnumTest.md) diff --git a/samples/client/petstore/java/webclient/api/openapi.yaml b/samples/client/petstore/java/webclient/api/openapi.yaml index 80e871590a3..9f0affe779f 100644 --- a/samples/client/petstore/java/webclient/api/openapi.yaml +++ b/samples/client/petstore/java/webclient/api/openapi.yaml @@ -1515,11 +1515,17 @@ components: Dog: allOf: - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Dog_allOf' + - properties: + breed: + type: string + type: object Cat: allOf: - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Cat_allOf' + - properties: + declawed: + type: boolean + type: object Animal: discriminator: mapping: @@ -2159,18 +2165,6 @@ components: required: - requiredFile type: object - Dog_allOf: - properties: - breed: - type: string - type: object - example: null - Cat_allOf: - properties: - declawed: - type: boolean - type: object - example: null securitySchemes: petstore_auth: flows: diff --git a/samples/client/petstore/java/webclient/docs/CatAllOf.md b/samples/client/petstore/java/webclient/docs/CatAllOf.md deleted file mode 100644 index 926bc0abd78..00000000000 --- a/samples/client/petstore/java/webclient/docs/CatAllOf.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# CatAllOf - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**declawed** | **Boolean** | | [optional] | - - - diff --git a/samples/client/petstore/java/webclient/docs/DogAllOf.md b/samples/client/petstore/java/webclient/docs/DogAllOf.md deleted file mode 100644 index d4e4ea0d548..00000000000 --- a/samples/client/petstore/java/webclient/docs/DogAllOf.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# DogAllOf - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**breed** | **String** | | [optional] | - - - diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/CatAllOf.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/CatAllOf.java deleted file mode 100644 index 7c404d48482..00000000000 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/CatAllOf.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** - * CatAllOf - */ -@JsonPropertyOrder({ - CatAllOf.JSON_PROPERTY_DECLAWED -}) -@JsonTypeName("Cat_allOf") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CatAllOf { - public static final String JSON_PROPERTY_DECLAWED = "declawed"; - private Boolean declawed; - - public CatAllOf() { - } - - public CatAllOf declawed(Boolean declawed) { - - this.declawed = declawed; - return this; - } - - /** - * Get declawed - * @return declawed - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DECLAWED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Boolean getDeclawed() { - return declawed; - } - - - @JsonProperty(JSON_PROPERTY_DECLAWED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDeclawed(Boolean declawed) { - this.declawed = declawed; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CatAllOf catAllOf = (CatAllOf) o; - return Objects.equals(this.declawed, catAllOf.declawed); - } - - @Override - public int hashCode() { - return Objects.hash(declawed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CatAllOf {\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/DogAllOf.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/DogAllOf.java deleted file mode 100644 index 2978c34e2cc..00000000000 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/DogAllOf.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** - * DogAllOf - */ -@JsonPropertyOrder({ - DogAllOf.JSON_PROPERTY_BREED -}) -@JsonTypeName("Dog_allOf") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DogAllOf { - public static final String JSON_PROPERTY_BREED = "breed"; - private String breed; - - public DogAllOf() { - } - - public DogAllOf breed(String breed) { - - this.breed = breed; - return this; - } - - /** - * Get breed - * @return breed - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_BREED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getBreed() { - return breed; - } - - - @JsonProperty(JSON_PROPERTY_BREED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setBreed(String breed) { - this.breed = breed; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DogAllOf dogAllOf = (DogAllOf) o; - return Objects.equals(this.breed, dogAllOf.breed); - } - - @Override - public int hashCode() { - return Objects.hash(breed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DogAllOf {\n"); - sb.append(" breed: ").append(toIndentedString(breed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/CatAllOfTest.java b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/CatAllOfTest.java deleted file mode 100644 index 269bdbe11b7..00000000000 --- a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/CatAllOfTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for CatAllOf - */ -public class CatAllOfTest { - private final CatAllOf model = new CatAllOf(); - - /** - * Model tests for CatAllOf - */ - @Test - public void testCatAllOf() { - // TODO: test CatAllOf - } - - /** - * Test the property 'declawed' - */ - @Test - public void declawedTest() { - // TODO: test declawed - } - -} diff --git a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/DogAllOfTest.java b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/DogAllOfTest.java deleted file mode 100644 index dfa91c25ec8..00000000000 --- a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/model/DogAllOfTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for DogAllOf - */ -public class DogAllOfTest { - private final DogAllOf model = new DogAllOf(); - - /** - * Model tests for DogAllOf - */ - @Test - public void testDogAllOf() { - // TODO: test DogAllOf - } - - /** - * Test the property 'breed' - */ - @Test - public void breedTest() { - // TODO: test breed - } - -} diff --git a/samples/client/petstore/javascript-apollo/.openapi-generator/FILES b/samples/client/petstore/javascript-apollo/.openapi-generator/FILES index 7582f4f63b7..9011fa6ed43 100644 --- a/samples/client/petstore/javascript-apollo/.openapi-generator/FILES +++ b/samples/client/petstore/javascript-apollo/.openapi-generator/FILES @@ -12,7 +12,6 @@ docs/ArrayTest.md docs/BasquePig.md docs/Capitalization.md docs/Cat.md -docs/CatAllOf.md docs/Category.md docs/ClassModel.md docs/Client.md @@ -21,7 +20,6 @@ docs/DanishPig.md docs/DefaultApi.md docs/DeprecatedObject.md docs/Dog.md -docs/DogAllOf.md docs/EnumArrays.md docs/EnumClass.md docs/EnumTest.md @@ -83,7 +81,6 @@ src/model/ArrayTest.js src/model/BasquePig.js src/model/Capitalization.js src/model/Cat.js -src/model/CatAllOf.js src/model/Category.js src/model/ClassModel.js src/model/Client.js @@ -91,7 +88,6 @@ src/model/Color.js src/model/DanishPig.js src/model/DeprecatedObject.js src/model/Dog.js -src/model/DogAllOf.js src/model/EnumArrays.js src/model/EnumClass.js src/model/EnumTest.js diff --git a/samples/client/petstore/javascript-apollo/README.md b/samples/client/petstore/javascript-apollo/README.md index aee1d14dc03..db2c6ef4a40 100644 --- a/samples/client/petstore/javascript-apollo/README.md +++ b/samples/client/petstore/javascript-apollo/README.md @@ -174,7 +174,6 @@ Class | Method | HTTP request | Description - [OpenApiPetstore.BasquePig](docs/BasquePig.md) - [OpenApiPetstore.Capitalization](docs/Capitalization.md) - [OpenApiPetstore.Cat](docs/Cat.md) - - [OpenApiPetstore.CatAllOf](docs/CatAllOf.md) - [OpenApiPetstore.Category](docs/Category.md) - [OpenApiPetstore.ClassModel](docs/ClassModel.md) - [OpenApiPetstore.Client](docs/Client.md) @@ -182,7 +181,6 @@ Class | Method | HTTP request | Description - [OpenApiPetstore.DanishPig](docs/DanishPig.md) - [OpenApiPetstore.DeprecatedObject](docs/DeprecatedObject.md) - [OpenApiPetstore.Dog](docs/Dog.md) - - [OpenApiPetstore.DogAllOf](docs/DogAllOf.md) - [OpenApiPetstore.EnumArrays](docs/EnumArrays.md) - [OpenApiPetstore.EnumClass](docs/EnumClass.md) - [OpenApiPetstore.EnumTest](docs/EnumTest.md) diff --git a/samples/client/petstore/javascript-apollo/docs/CatAllOf.md b/samples/client/petstore/javascript-apollo/docs/CatAllOf.md deleted file mode 100644 index 3b8274c0120..00000000000 --- a/samples/client/petstore/javascript-apollo/docs/CatAllOf.md +++ /dev/null @@ -1,9 +0,0 @@ -# OpenApiPetstore.CatAllOf - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**declawed** | **Boolean** | | [optional] - - diff --git a/samples/client/petstore/javascript-apollo/docs/DogAllOf.md b/samples/client/petstore/javascript-apollo/docs/DogAllOf.md deleted file mode 100644 index 8a640294073..00000000000 --- a/samples/client/petstore/javascript-apollo/docs/DogAllOf.md +++ /dev/null @@ -1,9 +0,0 @@ -# OpenApiPetstore.DogAllOf - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**breed** | **String** | | [optional] - - diff --git a/samples/client/petstore/javascript-apollo/src/index.js b/samples/client/petstore/javascript-apollo/src/index.js index f890e139a5e..2783bffde76 100644 --- a/samples/client/petstore/javascript-apollo/src/index.js +++ b/samples/client/petstore/javascript-apollo/src/index.js @@ -22,7 +22,6 @@ import ArrayTest from './model/ArrayTest'; import BasquePig from './model/BasquePig'; import Capitalization from './model/Capitalization'; import Cat from './model/Cat'; -import CatAllOf from './model/CatAllOf'; import Category from './model/Category'; import ClassModel from './model/ClassModel'; import Client from './model/Client'; @@ -30,7 +29,6 @@ import Color from './model/Color'; import DanishPig from './model/DanishPig'; import DeprecatedObject from './model/DeprecatedObject'; import Dog from './model/Dog'; -import DogAllOf from './model/DogAllOf'; import EnumArrays from './model/EnumArrays'; import EnumClass from './model/EnumClass'; import EnumTest from './model/EnumTest'; @@ -167,12 +165,6 @@ export { */ Cat, - /** - * The CatAllOf model constructor. - * @property {module:model/CatAllOf} - */ - CatAllOf, - /** * The Category model constructor. * @property {module:model/Category} @@ -215,12 +207,6 @@ export { */ Dog, - /** - * The DogAllOf model constructor. - * @property {module:model/DogAllOf} - */ - DogAllOf, - /** * The EnumArrays model constructor. * @property {module:model/EnumArrays} diff --git a/samples/client/petstore/javascript-apollo/src/model/Cat.js b/samples/client/petstore/javascript-apollo/src/model/Cat.js index 203a652cfc4..265748e0bd5 100644 --- a/samples/client/petstore/javascript-apollo/src/model/Cat.js +++ b/samples/client/petstore/javascript-apollo/src/model/Cat.js @@ -13,7 +13,6 @@ import ApiClient from '../ApiClient'; import Animal from './Animal'; -import CatAllOf from './CatAllOf'; /** * The Cat model module. @@ -26,11 +25,10 @@ class Cat { * @alias module:model/Cat * @extends module:model/Animal * @implements module:model/Animal - * @implements module:model/CatAllOf * @param className {String} */ constructor(className) { - Animal.initialize(this, className);CatAllOf.initialize(this); + Animal.initialize(this, className); Cat.initialize(this, className); } @@ -54,7 +52,6 @@ class Cat { obj = obj || new Cat(); Animal.constructFromObject(data, obj); Animal.constructFromObject(data, obj); - CatAllOf.constructFromObject(data, obj); if (data.hasOwnProperty('declawed')) { obj['declawed'] = ApiClient.convertToType(data['declawed'], 'Boolean'); @@ -100,11 +97,6 @@ Animal.prototype['className'] = undefined; * @default 'red' */ Animal.prototype['color'] = 'red'; -// Implement CatAllOf interface: -/** - * @member {Boolean} declawed - */ -CatAllOf.prototype['declawed'] = undefined; diff --git a/samples/client/petstore/javascript-apollo/src/model/CatAllOf.js b/samples/client/petstore/javascript-apollo/src/model/CatAllOf.js deleted file mode 100644 index 8c0d5bfbbd4..00000000000 --- a/samples/client/petstore/javascript-apollo/src/model/CatAllOf.js +++ /dev/null @@ -1,83 +0,0 @@ -/** - * 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: \" \\ - * - * The version of the OpenAPI document: 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 CatAllOf model module. - * @module model/CatAllOf - * @version 1.0.0 - */ -class CatAllOf { - /** - * Constructs a new CatAllOf. - * @alias module:model/CatAllOf - */ - constructor() { - - CatAllOf.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 CatAllOf 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/CatAllOf} obj Optional instance to populate. - * @return {module:model/CatAllOf} The populated CatAllOf instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new CatAllOf(); - - if (data.hasOwnProperty('declawed')) { - obj['declawed'] = ApiClient.convertToType(data['declawed'], 'Boolean'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to CatAllOf. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to CatAllOf. - */ - static validateJSON(data) { - - return true; - } - - -} - - - -/** - * @member {Boolean} declawed - */ -CatAllOf.prototype['declawed'] = undefined; - - - - - - -export default CatAllOf; - diff --git a/samples/client/petstore/javascript-apollo/src/model/Dog.js b/samples/client/petstore/javascript-apollo/src/model/Dog.js index dd3f1ebb509..081e54e0203 100644 --- a/samples/client/petstore/javascript-apollo/src/model/Dog.js +++ b/samples/client/petstore/javascript-apollo/src/model/Dog.js @@ -13,7 +13,6 @@ import ApiClient from '../ApiClient'; import Animal from './Animal'; -import DogAllOf from './DogAllOf'; /** * The Dog model module. @@ -26,11 +25,10 @@ class Dog { * @alias module:model/Dog * @extends module:model/Animal * @implements module:model/Animal - * @implements module:model/DogAllOf * @param className {String} */ constructor(className) { - Animal.initialize(this, className);DogAllOf.initialize(this); + Animal.initialize(this, className); Dog.initialize(this, className); } @@ -54,7 +52,6 @@ class Dog { obj = obj || new Dog(); Animal.constructFromObject(data, obj); Animal.constructFromObject(data, obj); - DogAllOf.constructFromObject(data, obj); if (data.hasOwnProperty('breed')) { obj['breed'] = ApiClient.convertToType(data['breed'], 'String'); @@ -104,11 +101,6 @@ Animal.prototype['className'] = undefined; * @default 'red' */ Animal.prototype['color'] = 'red'; -// Implement DogAllOf interface: -/** - * @member {String} breed - */ -DogAllOf.prototype['breed'] = undefined; diff --git a/samples/client/petstore/javascript-apollo/src/model/DogAllOf.js b/samples/client/petstore/javascript-apollo/src/model/DogAllOf.js deleted file mode 100644 index beb42db2ec8..00000000000 --- a/samples/client/petstore/javascript-apollo/src/model/DogAllOf.js +++ /dev/null @@ -1,87 +0,0 @@ -/** - * 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: \" \\ - * - * The version of the OpenAPI document: 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 DogAllOf model module. - * @module model/DogAllOf - * @version 1.0.0 - */ -class DogAllOf { - /** - * Constructs a new DogAllOf. - * @alias module:model/DogAllOf - */ - constructor() { - - DogAllOf.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 DogAllOf 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/DogAllOf} obj Optional instance to populate. - * @return {module:model/DogAllOf} The populated DogAllOf instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new DogAllOf(); - - if (data.hasOwnProperty('breed')) { - obj['breed'] = ApiClient.convertToType(data['breed'], 'String'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to DogAllOf. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to DogAllOf. - */ - static validateJSON(data) { - // ensure the json data is a string - if (data['breed'] && !(typeof data['breed'] === 'string' || data['breed'] instanceof String)) { - throw new Error("Expected the field `breed` to be a primitive type in the JSON string but got " + data['breed']); - } - - return true; - } - - -} - - - -/** - * @member {String} breed - */ -DogAllOf.prototype['breed'] = undefined; - - - - - - -export default DogAllOf; - diff --git a/samples/client/petstore/javascript-apollo/test/model/CatAllOf.spec.js b/samples/client/petstore/javascript-apollo/test/model/CatAllOf.spec.js deleted file mode 100644 index 7e9f50eaddd..00000000000 --- a/samples/client/petstore/javascript-apollo/test/model/CatAllOf.spec.js +++ /dev/null @@ -1,65 +0,0 @@ -/** - * 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: \" \\ - * - * The version of the OpenAPI document: 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', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/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.CatAllOf(); - }); - - 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('CatAllOf', function() { - it('should create an instance of CatAllOf', function() { - // uncomment below and update the code to test CatAllOf - //var instance = new OpenApiPetstore.CatAllOf(); - //expect(instance).to.be.a(OpenApiPetstore.CatAllOf); - }); - - it('should have the property declawed (base name: "declawed")', function() { - // uncomment below and update the code to test the property declawed - //var instance = new OpenApiPetstore.CatAllOf(); - //expect(instance).to.be(); - }); - - }); - -})); diff --git a/samples/client/petstore/javascript-apollo/test/model/DogAllOf.spec.js b/samples/client/petstore/javascript-apollo/test/model/DogAllOf.spec.js deleted file mode 100644 index 0bb726203a5..00000000000 --- a/samples/client/petstore/javascript-apollo/test/model/DogAllOf.spec.js +++ /dev/null @@ -1,65 +0,0 @@ -/** - * 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: \" \\ - * - * The version of the OpenAPI document: 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', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/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.DogAllOf(); - }); - - 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('DogAllOf', function() { - it('should create an instance of DogAllOf', function() { - // uncomment below and update the code to test DogAllOf - //var instance = new OpenApiPetstore.DogAllOf(); - //expect(instance).to.be.a(OpenApiPetstore.DogAllOf); - }); - - it('should have the property breed (base name: "breed")', function() { - // uncomment below and update the code to test the property breed - //var instance = new OpenApiPetstore.DogAllOf(); - //expect(instance).to.be(); - }); - - }); - -})); diff --git a/samples/client/petstore/javascript-es6/.openapi-generator/FILES b/samples/client/petstore/javascript-es6/.openapi-generator/FILES index 7582f4f63b7..9011fa6ed43 100644 --- a/samples/client/petstore/javascript-es6/.openapi-generator/FILES +++ b/samples/client/petstore/javascript-es6/.openapi-generator/FILES @@ -12,7 +12,6 @@ docs/ArrayTest.md docs/BasquePig.md docs/Capitalization.md docs/Cat.md -docs/CatAllOf.md docs/Category.md docs/ClassModel.md docs/Client.md @@ -21,7 +20,6 @@ docs/DanishPig.md docs/DefaultApi.md docs/DeprecatedObject.md docs/Dog.md -docs/DogAllOf.md docs/EnumArrays.md docs/EnumClass.md docs/EnumTest.md @@ -83,7 +81,6 @@ src/model/ArrayTest.js src/model/BasquePig.js src/model/Capitalization.js src/model/Cat.js -src/model/CatAllOf.js src/model/Category.js src/model/ClassModel.js src/model/Client.js @@ -91,7 +88,6 @@ src/model/Color.js src/model/DanishPig.js src/model/DeprecatedObject.js src/model/Dog.js -src/model/DogAllOf.js src/model/EnumArrays.js src/model/EnumClass.js src/model/EnumTest.js diff --git a/samples/client/petstore/javascript-es6/README.md b/samples/client/petstore/javascript-es6/README.md index aee1d14dc03..db2c6ef4a40 100644 --- a/samples/client/petstore/javascript-es6/README.md +++ b/samples/client/petstore/javascript-es6/README.md @@ -174,7 +174,6 @@ Class | Method | HTTP request | Description - [OpenApiPetstore.BasquePig](docs/BasquePig.md) - [OpenApiPetstore.Capitalization](docs/Capitalization.md) - [OpenApiPetstore.Cat](docs/Cat.md) - - [OpenApiPetstore.CatAllOf](docs/CatAllOf.md) - [OpenApiPetstore.Category](docs/Category.md) - [OpenApiPetstore.ClassModel](docs/ClassModel.md) - [OpenApiPetstore.Client](docs/Client.md) @@ -182,7 +181,6 @@ Class | Method | HTTP request | Description - [OpenApiPetstore.DanishPig](docs/DanishPig.md) - [OpenApiPetstore.DeprecatedObject](docs/DeprecatedObject.md) - [OpenApiPetstore.Dog](docs/Dog.md) - - [OpenApiPetstore.DogAllOf](docs/DogAllOf.md) - [OpenApiPetstore.EnumArrays](docs/EnumArrays.md) - [OpenApiPetstore.EnumClass](docs/EnumClass.md) - [OpenApiPetstore.EnumTest](docs/EnumTest.md) diff --git a/samples/client/petstore/javascript-es6/docs/CatAllOf.md b/samples/client/petstore/javascript-es6/docs/CatAllOf.md deleted file mode 100644 index 3b8274c0120..00000000000 --- a/samples/client/petstore/javascript-es6/docs/CatAllOf.md +++ /dev/null @@ -1,9 +0,0 @@ -# OpenApiPetstore.CatAllOf - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**declawed** | **Boolean** | | [optional] - - diff --git a/samples/client/petstore/javascript-es6/docs/DogAllOf.md b/samples/client/petstore/javascript-es6/docs/DogAllOf.md deleted file mode 100644 index 8a640294073..00000000000 --- a/samples/client/petstore/javascript-es6/docs/DogAllOf.md +++ /dev/null @@ -1,9 +0,0 @@ -# OpenApiPetstore.DogAllOf - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**breed** | **String** | | [optional] - - diff --git a/samples/client/petstore/javascript-es6/src/index.js b/samples/client/petstore/javascript-es6/src/index.js index f890e139a5e..2783bffde76 100644 --- a/samples/client/petstore/javascript-es6/src/index.js +++ b/samples/client/petstore/javascript-es6/src/index.js @@ -22,7 +22,6 @@ import ArrayTest from './model/ArrayTest'; import BasquePig from './model/BasquePig'; import Capitalization from './model/Capitalization'; import Cat from './model/Cat'; -import CatAllOf from './model/CatAllOf'; import Category from './model/Category'; import ClassModel from './model/ClassModel'; import Client from './model/Client'; @@ -30,7 +29,6 @@ import Color from './model/Color'; import DanishPig from './model/DanishPig'; import DeprecatedObject from './model/DeprecatedObject'; import Dog from './model/Dog'; -import DogAllOf from './model/DogAllOf'; import EnumArrays from './model/EnumArrays'; import EnumClass from './model/EnumClass'; import EnumTest from './model/EnumTest'; @@ -167,12 +165,6 @@ export { */ Cat, - /** - * The CatAllOf model constructor. - * @property {module:model/CatAllOf} - */ - CatAllOf, - /** * The Category model constructor. * @property {module:model/Category} @@ -215,12 +207,6 @@ export { */ Dog, - /** - * The DogAllOf model constructor. - * @property {module:model/DogAllOf} - */ - DogAllOf, - /** * The EnumArrays model constructor. * @property {module:model/EnumArrays} diff --git a/samples/client/petstore/javascript-es6/src/model/Cat.js b/samples/client/petstore/javascript-es6/src/model/Cat.js index 203a652cfc4..265748e0bd5 100644 --- a/samples/client/petstore/javascript-es6/src/model/Cat.js +++ b/samples/client/petstore/javascript-es6/src/model/Cat.js @@ -13,7 +13,6 @@ import ApiClient from '../ApiClient'; import Animal from './Animal'; -import CatAllOf from './CatAllOf'; /** * The Cat model module. @@ -26,11 +25,10 @@ class Cat { * @alias module:model/Cat * @extends module:model/Animal * @implements module:model/Animal - * @implements module:model/CatAllOf * @param className {String} */ constructor(className) { - Animal.initialize(this, className);CatAllOf.initialize(this); + Animal.initialize(this, className); Cat.initialize(this, className); } @@ -54,7 +52,6 @@ class Cat { obj = obj || new Cat(); Animal.constructFromObject(data, obj); Animal.constructFromObject(data, obj); - CatAllOf.constructFromObject(data, obj); if (data.hasOwnProperty('declawed')) { obj['declawed'] = ApiClient.convertToType(data['declawed'], 'Boolean'); @@ -100,11 +97,6 @@ Animal.prototype['className'] = undefined; * @default 'red' */ Animal.prototype['color'] = 'red'; -// Implement CatAllOf interface: -/** - * @member {Boolean} declawed - */ -CatAllOf.prototype['declawed'] = undefined; diff --git a/samples/client/petstore/javascript-es6/src/model/CatAllOf.js b/samples/client/petstore/javascript-es6/src/model/CatAllOf.js deleted file mode 100644 index 8c0d5bfbbd4..00000000000 --- a/samples/client/petstore/javascript-es6/src/model/CatAllOf.js +++ /dev/null @@ -1,83 +0,0 @@ -/** - * 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: \" \\ - * - * The version of the OpenAPI document: 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 CatAllOf model module. - * @module model/CatAllOf - * @version 1.0.0 - */ -class CatAllOf { - /** - * Constructs a new CatAllOf. - * @alias module:model/CatAllOf - */ - constructor() { - - CatAllOf.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 CatAllOf 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/CatAllOf} obj Optional instance to populate. - * @return {module:model/CatAllOf} The populated CatAllOf instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new CatAllOf(); - - if (data.hasOwnProperty('declawed')) { - obj['declawed'] = ApiClient.convertToType(data['declawed'], 'Boolean'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to CatAllOf. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to CatAllOf. - */ - static validateJSON(data) { - - return true; - } - - -} - - - -/** - * @member {Boolean} declawed - */ -CatAllOf.prototype['declawed'] = undefined; - - - - - - -export default CatAllOf; - diff --git a/samples/client/petstore/javascript-es6/src/model/Dog.js b/samples/client/petstore/javascript-es6/src/model/Dog.js index dd3f1ebb509..081e54e0203 100644 --- a/samples/client/petstore/javascript-es6/src/model/Dog.js +++ b/samples/client/petstore/javascript-es6/src/model/Dog.js @@ -13,7 +13,6 @@ import ApiClient from '../ApiClient'; import Animal from './Animal'; -import DogAllOf from './DogAllOf'; /** * The Dog model module. @@ -26,11 +25,10 @@ class Dog { * @alias module:model/Dog * @extends module:model/Animal * @implements module:model/Animal - * @implements module:model/DogAllOf * @param className {String} */ constructor(className) { - Animal.initialize(this, className);DogAllOf.initialize(this); + Animal.initialize(this, className); Dog.initialize(this, className); } @@ -54,7 +52,6 @@ class Dog { obj = obj || new Dog(); Animal.constructFromObject(data, obj); Animal.constructFromObject(data, obj); - DogAllOf.constructFromObject(data, obj); if (data.hasOwnProperty('breed')) { obj['breed'] = ApiClient.convertToType(data['breed'], 'String'); @@ -104,11 +101,6 @@ Animal.prototype['className'] = undefined; * @default 'red' */ Animal.prototype['color'] = 'red'; -// Implement DogAllOf interface: -/** - * @member {String} breed - */ -DogAllOf.prototype['breed'] = undefined; diff --git a/samples/client/petstore/javascript-es6/src/model/DogAllOf.js b/samples/client/petstore/javascript-es6/src/model/DogAllOf.js deleted file mode 100644 index beb42db2ec8..00000000000 --- a/samples/client/petstore/javascript-es6/src/model/DogAllOf.js +++ /dev/null @@ -1,87 +0,0 @@ -/** - * 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: \" \\ - * - * The version of the OpenAPI document: 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 DogAllOf model module. - * @module model/DogAllOf - * @version 1.0.0 - */ -class DogAllOf { - /** - * Constructs a new DogAllOf. - * @alias module:model/DogAllOf - */ - constructor() { - - DogAllOf.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 DogAllOf 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/DogAllOf} obj Optional instance to populate. - * @return {module:model/DogAllOf} The populated DogAllOf instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new DogAllOf(); - - if (data.hasOwnProperty('breed')) { - obj['breed'] = ApiClient.convertToType(data['breed'], 'String'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to DogAllOf. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to DogAllOf. - */ - static validateJSON(data) { - // ensure the json data is a string - if (data['breed'] && !(typeof data['breed'] === 'string' || data['breed'] instanceof String)) { - throw new Error("Expected the field `breed` to be a primitive type in the JSON string but got " + data['breed']); - } - - return true; - } - - -} - - - -/** - * @member {String} breed - */ -DogAllOf.prototype['breed'] = undefined; - - - - - - -export default DogAllOf; - diff --git a/samples/client/petstore/javascript-es6/test/model/CatAllOf.spec.js b/samples/client/petstore/javascript-es6/test/model/CatAllOf.spec.js deleted file mode 100644 index 7e9f50eaddd..00000000000 --- a/samples/client/petstore/javascript-es6/test/model/CatAllOf.spec.js +++ /dev/null @@ -1,65 +0,0 @@ -/** - * 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: \" \\ - * - * The version of the OpenAPI document: 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', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/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.CatAllOf(); - }); - - 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('CatAllOf', function() { - it('should create an instance of CatAllOf', function() { - // uncomment below and update the code to test CatAllOf - //var instance = new OpenApiPetstore.CatAllOf(); - //expect(instance).to.be.a(OpenApiPetstore.CatAllOf); - }); - - it('should have the property declawed (base name: "declawed")', function() { - // uncomment below and update the code to test the property declawed - //var instance = new OpenApiPetstore.CatAllOf(); - //expect(instance).to.be(); - }); - - }); - -})); diff --git a/samples/client/petstore/javascript-es6/test/model/DogAllOf.spec.js b/samples/client/petstore/javascript-es6/test/model/DogAllOf.spec.js deleted file mode 100644 index 0bb726203a5..00000000000 --- a/samples/client/petstore/javascript-es6/test/model/DogAllOf.spec.js +++ /dev/null @@ -1,65 +0,0 @@ -/** - * 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: \" \\ - * - * The version of the OpenAPI document: 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', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/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.DogAllOf(); - }); - - 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('DogAllOf', function() { - it('should create an instance of DogAllOf', function() { - // uncomment below and update the code to test DogAllOf - //var instance = new OpenApiPetstore.DogAllOf(); - //expect(instance).to.be.a(OpenApiPetstore.DogAllOf); - }); - - it('should have the property breed (base name: "breed")', function() { - // uncomment below and update the code to test the property breed - //var instance = new OpenApiPetstore.DogAllOf(); - //expect(instance).to.be(); - }); - - }); - -})); diff --git a/samples/client/petstore/javascript-promise-es6/.openapi-generator/FILES b/samples/client/petstore/javascript-promise-es6/.openapi-generator/FILES index 7582f4f63b7..9011fa6ed43 100644 --- a/samples/client/petstore/javascript-promise-es6/.openapi-generator/FILES +++ b/samples/client/petstore/javascript-promise-es6/.openapi-generator/FILES @@ -12,7 +12,6 @@ docs/ArrayTest.md docs/BasquePig.md docs/Capitalization.md docs/Cat.md -docs/CatAllOf.md docs/Category.md docs/ClassModel.md docs/Client.md @@ -21,7 +20,6 @@ docs/DanishPig.md docs/DefaultApi.md docs/DeprecatedObject.md docs/Dog.md -docs/DogAllOf.md docs/EnumArrays.md docs/EnumClass.md docs/EnumTest.md @@ -83,7 +81,6 @@ src/model/ArrayTest.js src/model/BasquePig.js src/model/Capitalization.js src/model/Cat.js -src/model/CatAllOf.js src/model/Category.js src/model/ClassModel.js src/model/Client.js @@ -91,7 +88,6 @@ src/model/Color.js src/model/DanishPig.js src/model/DeprecatedObject.js src/model/Dog.js -src/model/DogAllOf.js src/model/EnumArrays.js src/model/EnumClass.js src/model/EnumTest.js diff --git a/samples/client/petstore/javascript-promise-es6/README.md b/samples/client/petstore/javascript-promise-es6/README.md index 5dbc2e29f5f..41cd1ad2a0f 100644 --- a/samples/client/petstore/javascript-promise-es6/README.md +++ b/samples/client/petstore/javascript-promise-es6/README.md @@ -172,7 +172,6 @@ Class | Method | HTTP request | Description - [OpenApiPetstore.BasquePig](docs/BasquePig.md) - [OpenApiPetstore.Capitalization](docs/Capitalization.md) - [OpenApiPetstore.Cat](docs/Cat.md) - - [OpenApiPetstore.CatAllOf](docs/CatAllOf.md) - [OpenApiPetstore.Category](docs/Category.md) - [OpenApiPetstore.ClassModel](docs/ClassModel.md) - [OpenApiPetstore.Client](docs/Client.md) @@ -180,7 +179,6 @@ Class | Method | HTTP request | Description - [OpenApiPetstore.DanishPig](docs/DanishPig.md) - [OpenApiPetstore.DeprecatedObject](docs/DeprecatedObject.md) - [OpenApiPetstore.Dog](docs/Dog.md) - - [OpenApiPetstore.DogAllOf](docs/DogAllOf.md) - [OpenApiPetstore.EnumArrays](docs/EnumArrays.md) - [OpenApiPetstore.EnumClass](docs/EnumClass.md) - [OpenApiPetstore.EnumTest](docs/EnumTest.md) diff --git a/samples/client/petstore/javascript-promise-es6/docs/CatAllOf.md b/samples/client/petstore/javascript-promise-es6/docs/CatAllOf.md deleted file mode 100644 index 3b8274c0120..00000000000 --- a/samples/client/petstore/javascript-promise-es6/docs/CatAllOf.md +++ /dev/null @@ -1,9 +0,0 @@ -# OpenApiPetstore.CatAllOf - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**declawed** | **Boolean** | | [optional] - - diff --git a/samples/client/petstore/javascript-promise-es6/docs/DogAllOf.md b/samples/client/petstore/javascript-promise-es6/docs/DogAllOf.md deleted file mode 100644 index 8a640294073..00000000000 --- a/samples/client/petstore/javascript-promise-es6/docs/DogAllOf.md +++ /dev/null @@ -1,9 +0,0 @@ -# OpenApiPetstore.DogAllOf - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**breed** | **String** | | [optional] - - diff --git a/samples/client/petstore/javascript-promise-es6/src/index.js b/samples/client/petstore/javascript-promise-es6/src/index.js index f890e139a5e..2783bffde76 100644 --- a/samples/client/petstore/javascript-promise-es6/src/index.js +++ b/samples/client/petstore/javascript-promise-es6/src/index.js @@ -22,7 +22,6 @@ import ArrayTest from './model/ArrayTest'; import BasquePig from './model/BasquePig'; import Capitalization from './model/Capitalization'; import Cat from './model/Cat'; -import CatAllOf from './model/CatAllOf'; import Category from './model/Category'; import ClassModel from './model/ClassModel'; import Client from './model/Client'; @@ -30,7 +29,6 @@ import Color from './model/Color'; import DanishPig from './model/DanishPig'; import DeprecatedObject from './model/DeprecatedObject'; import Dog from './model/Dog'; -import DogAllOf from './model/DogAllOf'; import EnumArrays from './model/EnumArrays'; import EnumClass from './model/EnumClass'; import EnumTest from './model/EnumTest'; @@ -167,12 +165,6 @@ export { */ Cat, - /** - * The CatAllOf model constructor. - * @property {module:model/CatAllOf} - */ - CatAllOf, - /** * The Category model constructor. * @property {module:model/Category} @@ -215,12 +207,6 @@ export { */ Dog, - /** - * The DogAllOf model constructor. - * @property {module:model/DogAllOf} - */ - DogAllOf, - /** * The EnumArrays model constructor. * @property {module:model/EnumArrays} diff --git a/samples/client/petstore/javascript-promise-es6/src/model/Cat.js b/samples/client/petstore/javascript-promise-es6/src/model/Cat.js index 203a652cfc4..265748e0bd5 100644 --- a/samples/client/petstore/javascript-promise-es6/src/model/Cat.js +++ b/samples/client/petstore/javascript-promise-es6/src/model/Cat.js @@ -13,7 +13,6 @@ import ApiClient from '../ApiClient'; import Animal from './Animal'; -import CatAllOf from './CatAllOf'; /** * The Cat model module. @@ -26,11 +25,10 @@ class Cat { * @alias module:model/Cat * @extends module:model/Animal * @implements module:model/Animal - * @implements module:model/CatAllOf * @param className {String} */ constructor(className) { - Animal.initialize(this, className);CatAllOf.initialize(this); + Animal.initialize(this, className); Cat.initialize(this, className); } @@ -54,7 +52,6 @@ class Cat { obj = obj || new Cat(); Animal.constructFromObject(data, obj); Animal.constructFromObject(data, obj); - CatAllOf.constructFromObject(data, obj); if (data.hasOwnProperty('declawed')) { obj['declawed'] = ApiClient.convertToType(data['declawed'], 'Boolean'); @@ -100,11 +97,6 @@ Animal.prototype['className'] = undefined; * @default 'red' */ Animal.prototype['color'] = 'red'; -// Implement CatAllOf interface: -/** - * @member {Boolean} declawed - */ -CatAllOf.prototype['declawed'] = undefined; diff --git a/samples/client/petstore/javascript-promise-es6/src/model/CatAllOf.js b/samples/client/petstore/javascript-promise-es6/src/model/CatAllOf.js deleted file mode 100644 index 8c0d5bfbbd4..00000000000 --- a/samples/client/petstore/javascript-promise-es6/src/model/CatAllOf.js +++ /dev/null @@ -1,83 +0,0 @@ -/** - * 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: \" \\ - * - * The version of the OpenAPI document: 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 CatAllOf model module. - * @module model/CatAllOf - * @version 1.0.0 - */ -class CatAllOf { - /** - * Constructs a new CatAllOf. - * @alias module:model/CatAllOf - */ - constructor() { - - CatAllOf.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 CatAllOf 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/CatAllOf} obj Optional instance to populate. - * @return {module:model/CatAllOf} The populated CatAllOf instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new CatAllOf(); - - if (data.hasOwnProperty('declawed')) { - obj['declawed'] = ApiClient.convertToType(data['declawed'], 'Boolean'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to CatAllOf. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to CatAllOf. - */ - static validateJSON(data) { - - return true; - } - - -} - - - -/** - * @member {Boolean} declawed - */ -CatAllOf.prototype['declawed'] = undefined; - - - - - - -export default CatAllOf; - diff --git a/samples/client/petstore/javascript-promise-es6/src/model/Dog.js b/samples/client/petstore/javascript-promise-es6/src/model/Dog.js index dd3f1ebb509..081e54e0203 100644 --- a/samples/client/petstore/javascript-promise-es6/src/model/Dog.js +++ b/samples/client/petstore/javascript-promise-es6/src/model/Dog.js @@ -13,7 +13,6 @@ import ApiClient from '../ApiClient'; import Animal from './Animal'; -import DogAllOf from './DogAllOf'; /** * The Dog model module. @@ -26,11 +25,10 @@ class Dog { * @alias module:model/Dog * @extends module:model/Animal * @implements module:model/Animal - * @implements module:model/DogAllOf * @param className {String} */ constructor(className) { - Animal.initialize(this, className);DogAllOf.initialize(this); + Animal.initialize(this, className); Dog.initialize(this, className); } @@ -54,7 +52,6 @@ class Dog { obj = obj || new Dog(); Animal.constructFromObject(data, obj); Animal.constructFromObject(data, obj); - DogAllOf.constructFromObject(data, obj); if (data.hasOwnProperty('breed')) { obj['breed'] = ApiClient.convertToType(data['breed'], 'String'); @@ -104,11 +101,6 @@ Animal.prototype['className'] = undefined; * @default 'red' */ Animal.prototype['color'] = 'red'; -// Implement DogAllOf interface: -/** - * @member {String} breed - */ -DogAllOf.prototype['breed'] = undefined; diff --git a/samples/client/petstore/javascript-promise-es6/src/model/DogAllOf.js b/samples/client/petstore/javascript-promise-es6/src/model/DogAllOf.js deleted file mode 100644 index beb42db2ec8..00000000000 --- a/samples/client/petstore/javascript-promise-es6/src/model/DogAllOf.js +++ /dev/null @@ -1,87 +0,0 @@ -/** - * 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: \" \\ - * - * The version of the OpenAPI document: 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 DogAllOf model module. - * @module model/DogAllOf - * @version 1.0.0 - */ -class DogAllOf { - /** - * Constructs a new DogAllOf. - * @alias module:model/DogAllOf - */ - constructor() { - - DogAllOf.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 DogAllOf 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/DogAllOf} obj Optional instance to populate. - * @return {module:model/DogAllOf} The populated DogAllOf instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new DogAllOf(); - - if (data.hasOwnProperty('breed')) { - obj['breed'] = ApiClient.convertToType(data['breed'], 'String'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to DogAllOf. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to DogAllOf. - */ - static validateJSON(data) { - // ensure the json data is a string - if (data['breed'] && !(typeof data['breed'] === 'string' || data['breed'] instanceof String)) { - throw new Error("Expected the field `breed` to be a primitive type in the JSON string but got " + data['breed']); - } - - return true; - } - - -} - - - -/** - * @member {String} breed - */ -DogAllOf.prototype['breed'] = undefined; - - - - - - -export default DogAllOf; - diff --git a/samples/client/petstore/javascript-promise-es6/test/model/CatAllOf.spec.js b/samples/client/petstore/javascript-promise-es6/test/model/CatAllOf.spec.js deleted file mode 100644 index 7e9f50eaddd..00000000000 --- a/samples/client/petstore/javascript-promise-es6/test/model/CatAllOf.spec.js +++ /dev/null @@ -1,65 +0,0 @@ -/** - * 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: \" \\ - * - * The version of the OpenAPI document: 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', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/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.CatAllOf(); - }); - - 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('CatAllOf', function() { - it('should create an instance of CatAllOf', function() { - // uncomment below and update the code to test CatAllOf - //var instance = new OpenApiPetstore.CatAllOf(); - //expect(instance).to.be.a(OpenApiPetstore.CatAllOf); - }); - - it('should have the property declawed (base name: "declawed")', function() { - // uncomment below and update the code to test the property declawed - //var instance = new OpenApiPetstore.CatAllOf(); - //expect(instance).to.be(); - }); - - }); - -})); diff --git a/samples/client/petstore/javascript-promise-es6/test/model/DogAllOf.spec.js b/samples/client/petstore/javascript-promise-es6/test/model/DogAllOf.spec.js deleted file mode 100644 index 0bb726203a5..00000000000 --- a/samples/client/petstore/javascript-promise-es6/test/model/DogAllOf.spec.js +++ /dev/null @@ -1,65 +0,0 @@ -/** - * 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: \" \\ - * - * The version of the OpenAPI document: 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', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/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.DogAllOf(); - }); - - 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('DogAllOf', function() { - it('should create an instance of DogAllOf', function() { - // uncomment below and update the code to test DogAllOf - //var instance = new OpenApiPetstore.DogAllOf(); - //expect(instance).to.be.a(OpenApiPetstore.DogAllOf); - }); - - it('should have the property breed (base name: "breed")', function() { - // uncomment below and update the code to test the property breed - //var instance = new OpenApiPetstore.DogAllOf(); - //expect(instance).to.be(); - }); - - }); - -})); diff --git a/samples/client/petstore/kotlin-allOff-discriminator/.openapi-generator/FILES b/samples/client/petstore/kotlin-allOff-discriminator/.openapi-generator/FILES index c9e511d382f..3584a03b3b5 100644 --- a/samples/client/petstore/kotlin-allOff-discriminator/.openapi-generator/FILES +++ b/samples/client/petstore/kotlin-allOff-discriminator/.openapi-generator/FILES @@ -2,7 +2,6 @@ README.md build.gradle docs/Animal.md docs/Bird.md -docs/BirdAllOf.md docs/BirdApi.md gradle/wrapper/gradle-wrapper.jar gradle/wrapper/gradle-wrapper.properties @@ -30,4 +29,3 @@ src/main/kotlin/org/openapitools/client/infrastructure/URIAdapter.kt src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt src/main/kotlin/org/openapitools/client/models/Animal.kt src/main/kotlin/org/openapitools/client/models/Bird.kt -src/main/kotlin/org/openapitools/client/models/BirdAllOf.kt diff --git a/samples/client/petstore/kotlin-allOff-discriminator/README.md b/samples/client/petstore/kotlin-allOff-discriminator/README.md index ce31dd73eef..ce3ce33b3c1 100644 --- a/samples/client/petstore/kotlin-allOff-discriminator/README.md +++ b/samples/client/petstore/kotlin-allOff-discriminator/README.md @@ -53,7 +53,6 @@ Class | Method | HTTP request | Description - [org.openapitools.client.models.Animal](docs/Animal.md) - [org.openapitools.client.models.Bird](docs/Bird.md) - - [org.openapitools.client.models.BirdAllOf](docs/BirdAllOf.md) diff --git a/samples/client/petstore/kotlin-allOff-discriminator/docs/BirdAllOf.md b/samples/client/petstore/kotlin-allOff-discriminator/docs/BirdAllOf.md deleted file mode 100644 index cccb4c058d7..00000000000 --- a/samples/client/petstore/kotlin-allOff-discriminator/docs/BirdAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ - -# BirdAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**featherType** | **kotlin.String** | | - - - diff --git a/samples/client/petstore/kotlin-allOff-discriminator/src/main/kotlin/org/openapitools/client/models/BirdAllOf.kt b/samples/client/petstore/kotlin-allOff-discriminator/src/main/kotlin/org/openapitools/client/models/BirdAllOf.kt deleted file mode 100644 index ccce94822ba..00000000000 --- a/samples/client/petstore/kotlin-allOff-discriminator/src/main/kotlin/org/openapitools/client/models/BirdAllOf.kt +++ /dev/null @@ -1,35 +0,0 @@ -/** - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - * - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package org.openapitools.client.models - - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param featherType - */ - - -data class BirdAllOf ( - - @Json(name = "featherType") - val featherType: kotlin.String - -) - diff --git a/samples/client/petstore/perl/.openapi-generator/FILES b/samples/client/petstore/perl/.openapi-generator/FILES index 4e8a811677d..d47a62bb7b3 100644 --- a/samples/client/petstore/perl/.openapi-generator/FILES +++ b/samples/client/petstore/perl/.openapi-generator/FILES @@ -12,14 +12,12 @@ docs/ArrayOfNumberOnly.md docs/ArrayTest.md docs/Capitalization.md docs/Cat.md -docs/CatAllOf.md docs/Category.md docs/ClassModel.md docs/Client.md docs/DefaultApi.md docs/DeprecatedObject.md docs/Dog.md -docs/DogAllOf.md docs/EnumArrays.md docs/EnumClass.md docs/EnumTest.md @@ -75,13 +73,11 @@ lib/WWW/OpenAPIClient/Object/ArrayOfNumberOnly.pm lib/WWW/OpenAPIClient/Object/ArrayTest.pm lib/WWW/OpenAPIClient/Object/Capitalization.pm lib/WWW/OpenAPIClient/Object/Cat.pm -lib/WWW/OpenAPIClient/Object/CatAllOf.pm lib/WWW/OpenAPIClient/Object/Category.pm lib/WWW/OpenAPIClient/Object/ClassModel.pm lib/WWW/OpenAPIClient/Object/Client.pm lib/WWW/OpenAPIClient/Object/DeprecatedObject.pm lib/WWW/OpenAPIClient/Object/Dog.pm -lib/WWW/OpenAPIClient/Object/DogAllOf.pm lib/WWW/OpenAPIClient/Object/EnumArrays.pm lib/WWW/OpenAPIClient/Object/EnumClass.pm lib/WWW/OpenAPIClient/Object/EnumTest.pm diff --git a/samples/client/petstore/perl/README.md b/samples/client/petstore/perl/README.md index d51c2a9cb9b..dc7daa76c9a 100644 --- a/samples/client/petstore/perl/README.md +++ b/samples/client/petstore/perl/README.md @@ -251,13 +251,11 @@ use WWW::OpenAPIClient::Object::ArrayOfNumberOnly; use WWW::OpenAPIClient::Object::ArrayTest; use WWW::OpenAPIClient::Object::Capitalization; use WWW::OpenAPIClient::Object::Cat; -use WWW::OpenAPIClient::Object::CatAllOf; use WWW::OpenAPIClient::Object::Category; use WWW::OpenAPIClient::Object::ClassModel; use WWW::OpenAPIClient::Object::Client; use WWW::OpenAPIClient::Object::DeprecatedObject; use WWW::OpenAPIClient::Object::Dog; -use WWW::OpenAPIClient::Object::DogAllOf; use WWW::OpenAPIClient::Object::EnumArrays; use WWW::OpenAPIClient::Object::EnumClass; use WWW::OpenAPIClient::Object::EnumTest; @@ -320,13 +318,11 @@ use WWW::OpenAPIClient::Object::ArrayOfNumberOnly; use WWW::OpenAPIClient::Object::ArrayTest; use WWW::OpenAPIClient::Object::Capitalization; use WWW::OpenAPIClient::Object::Cat; -use WWW::OpenAPIClient::Object::CatAllOf; use WWW::OpenAPIClient::Object::Category; use WWW::OpenAPIClient::Object::ClassModel; use WWW::OpenAPIClient::Object::Client; use WWW::OpenAPIClient::Object::DeprecatedObject; use WWW::OpenAPIClient::Object::Dog; -use WWW::OpenAPIClient::Object::DogAllOf; use WWW::OpenAPIClient::Object::EnumArrays; use WWW::OpenAPIClient::Object::EnumClass; use WWW::OpenAPIClient::Object::EnumTest; @@ -440,13 +436,11 @@ Class | Method | HTTP request | Description - [WWW::OpenAPIClient::Object::ArrayTest](docs/ArrayTest.md) - [WWW::OpenAPIClient::Object::Capitalization](docs/Capitalization.md) - [WWW::OpenAPIClient::Object::Cat](docs/Cat.md) - - [WWW::OpenAPIClient::Object::CatAllOf](docs/CatAllOf.md) - [WWW::OpenAPIClient::Object::Category](docs/Category.md) - [WWW::OpenAPIClient::Object::ClassModel](docs/ClassModel.md) - [WWW::OpenAPIClient::Object::Client](docs/Client.md) - [WWW::OpenAPIClient::Object::DeprecatedObject](docs/DeprecatedObject.md) - [WWW::OpenAPIClient::Object::Dog](docs/Dog.md) - - [WWW::OpenAPIClient::Object::DogAllOf](docs/DogAllOf.md) - [WWW::OpenAPIClient::Object::EnumArrays](docs/EnumArrays.md) - [WWW::OpenAPIClient::Object::EnumClass](docs/EnumClass.md) - [WWW::OpenAPIClient::Object::EnumTest](docs/EnumTest.md) diff --git a/samples/client/petstore/perl/docs/BigCatAllOf.md b/samples/client/petstore/perl/docs/BigCatAllOf.md deleted file mode 100644 index d6561af7868..00000000000 --- a/samples/client/petstore/perl/docs/BigCatAllOf.md +++ /dev/null @@ -1,15 +0,0 @@ -# WWW::OpenAPIClient::Object::BigCatAllOf - -## Load the model package -```perl -use WWW::OpenAPIClient::Object::BigCatAllOf; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**kind** | **string** | | [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/perl/docs/CatAllOf.md b/samples/client/petstore/perl/docs/CatAllOf.md deleted file mode 100644 index 5c422d64439..00000000000 --- a/samples/client/petstore/perl/docs/CatAllOf.md +++ /dev/null @@ -1,15 +0,0 @@ -# WWW::OpenAPIClient::Object::CatAllOf - -## Load the model package -```perl -use WWW::OpenAPIClient::Object::CatAllOf; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**declawed** | **boolean** | | [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/perl/docs/DogAllOf.md b/samples/client/petstore/perl/docs/DogAllOf.md deleted file mode 100644 index 6950ae9bba3..00000000000 --- a/samples/client/petstore/perl/docs/DogAllOf.md +++ /dev/null @@ -1,15 +0,0 @@ -# WWW::OpenAPIClient::Object::DogAllOf - -## Load the model package -```perl -use WWW::OpenAPIClient::Object::DogAllOf; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**breed** | **string** | | [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/perl/lib/WWW/OpenAPIClient/Object/BigCatAllOf.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/BigCatAllOf.pm deleted file mode 100644 index 8a36a3e02f6..00000000000 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/BigCatAllOf.pm +++ /dev/null @@ -1,184 +0,0 @@ -=begin comment - -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: \" \\ - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech - -=end comment - -=cut - -# -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# Do not edit the class manually. -# Ref: https://openapi-generator.tech -# -package WWW::OpenAPIClient::Object::BigCatAllOf; - -require 5.6.0; -use strict; -use warnings; -use utf8; -use JSON qw(decode_json); -use Data::Dumper; -use Module::Runtime qw(use_module); -use Log::Any qw($log); -use Date::Parse; -use DateTime; - - -use base ("Class::Accessor", "Class::Data::Inheritable"); - -# -# -# -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). Do not edit the class manually. -# REF: https://openapi-generator.tech -# - -=begin comment - -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: \" \\ - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech - -=end comment - -=cut - -# -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# Do not edit the class manually. -# Ref: https://openapi-generator.tech -# -__PACKAGE__->mk_classdata('attribute_map' => {}); -__PACKAGE__->mk_classdata('openapi_types' => {}); -__PACKAGE__->mk_classdata('method_documentation' => {}); -__PACKAGE__->mk_classdata('class_documentation' => {}); - -# new plain object -sub new { - my ($class, %args) = @_; - - my $self = bless {}, $class; - - $self->init(%args); - - return $self; -} - -# initialize the object -sub init -{ - my ($self, %args) = @_; - - foreach my $attribute (keys %{$self->attribute_map}) { - my $args_key = $self->attribute_map->{$attribute}; - $self->$attribute( $args{ $args_key } ); - } -} - -# return perl hash -sub to_hash { - my $self = shift; - my $_hash = decode_json(JSON->new->convert_blessed->encode($self)); - - return $_hash; -} - -# used by JSON for serialization -sub TO_JSON { - my $self = shift; - my $_data = {}; - foreach my $_key (keys %{$self->attribute_map}) { - if (defined $self->{$_key}) { - $_data->{$self->attribute_map->{$_key}} = $self->{$_key}; - } - } - - return $_data; -} - -# from Perl hashref -sub from_hash { - my ($self, $hash) = @_; - - # loop through attributes and use openapi_types to deserialize the data - while ( my ($_key, $_type) = each %{$self->openapi_types} ) { - my $_json_attribute = $self->attribute_map->{$_key}; - if ($_type =~ /^array\[(.+)\]$/i) { # array - my $_subclass = $1; - my @_array = (); - foreach my $_element (@{$hash->{$_json_attribute}}) { - push @_array, $self->_deserialize($_subclass, $_element); - } - $self->{$_key} = \@_array; - } elsif ($_type =~ /^hash\[string,(.+)\]$/i) { # hash - my $_subclass = $1; - my %_hash = (); - while (my($_key, $_element) = each %{$hash->{$_json_attribute}}) { - $_hash{$_key} = $self->_deserialize($_subclass, $_element); - } - $self->{$_key} = \%_hash; - } elsif (exists $hash->{$_json_attribute}) { #hash(model), primitive, datetime - $self->{$_key} = $self->_deserialize($_type, $hash->{$_json_attribute}); - } else { - $log->debugf("Warning: %s (%s) does not exist in input hash\n", $_key, $_json_attribute); - } - } - - return $self; -} - -# deserialize non-array data -sub _deserialize { - my ($self, $type, $data) = @_; - $log->debugf("deserializing %s with %s",Dumper($data), $type); - - if ($type eq 'DateTime') { - return DateTime->from_epoch(epoch => str2time($data)); - } elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) { - return $data; - } else { # hash(model) - my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()"; - return $_instance->from_hash($data); - } -} - - - -__PACKAGE__->class_documentation({description => '', - class => 'BigCatAllOf', - required => [], # TODO -} ); - -__PACKAGE__->method_documentation({ - 'kind' => { - datatype => 'string', - base_name => 'kind', - description => '', - format => '', - read_only => '', - }, -}); - -__PACKAGE__->openapi_types( { - 'kind' => 'string' -} ); - -__PACKAGE__->attribute_map( { - 'kind' => 'kind' -} ); - -__PACKAGE__->mk_accessors(keys %{__PACKAGE__->attribute_map}); - - -1; diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/CatAllOf.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/CatAllOf.pm deleted file mode 100644 index 35c42cd0498..00000000000 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/CatAllOf.pm +++ /dev/null @@ -1,242 +0,0 @@ -=begin comment - -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: \" \\ - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech - -=end comment - -=cut - -# -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# Do not edit the class manually. -# Ref: https://openapi-generator.tech -# -package WWW::OpenAPIClient::Object::CatAllOf; - -require 5.6.0; -use strict; -use warnings; -use utf8; -use JSON qw(decode_json); -use Data::Dumper; -use Module::Runtime qw(use_module); -use Log::Any qw($log); -use Date::Parse; -use DateTime; - - -use base ("Class::Accessor", "Class::Data::Inheritable"); - -# -# -# -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). Do not edit the class manually. -# REF: https://openapi-generator.tech -# - -=begin comment - -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: \" \\ - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech - -=end comment - -=cut - -# -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# Do not edit the class manually. -# Ref: https://openapi-generator.tech -# -__PACKAGE__->mk_classdata('attribute_map' => {}); -__PACKAGE__->mk_classdata('openapi_types' => {}); -__PACKAGE__->mk_classdata('method_documentation' => {}); -__PACKAGE__->mk_classdata('class_documentation' => {}); - -# new plain object -sub new { - my ($class, %args) = @_; - - my $self = bless {}, $class; - - $self->init(%args); - - return $self; -} - -# initialize the object -sub init -{ - my ($self, %args) = @_; - - foreach my $attribute (keys %{$self->attribute_map}) { - my $args_key = $self->attribute_map->{$attribute}; - $self->$attribute( $args{ $args_key } ); - } -} - -# return perl hash -sub to_hash { - my $self = shift; - my $_hash = decode_json(JSON->new->convert_blessed->encode($self)); - - return $_hash; -} - -# used by JSON for serialization -sub TO_JSON { - my $self = shift; - my $_data = {}; - foreach my $_key (keys %{$self->attribute_map}) { - if (defined $self->{$_key}) { - my $_json_attribute = $self->attribute_map->{$_key}; - my $_type = $self->openapi_types->{$_key}; - my $_value = $self->{$_key}; - if ($_type =~ /^array\[(.+)\]$/i) { # array - my $_subclass = $1; - $_data->{$_json_attribute} = [ map { $self->_to_json_primitives($_subclass, $_) } @$_value ]; - } elsif ($_type =~ /^hash\[string,(.+)\]$/i) { # hash - my $_subclass = $1; - my %_hash = (); - while (my($_key, $_element) = each %{$_value}) { - $_hash{$_key} = $self->_to_json_primitives($_subclass, $_element); - } - $_data->{$_json_attribute} = \%_hash; - } elsif ( grep( /^$_type$/, ('int', 'double', 'string', 'boolean', 'DATE', 'DATE_TIME'))) { - $_data->{$_json_attribute} = $self->_to_json_primitives($_type, $_value); - } else { - $_data->{$_json_attribute} = $_value; - } - } - } - - return $_data; -} - -# to_json non-array data -sub _to_json_primitives { - my ($self, $type, $data) = @_; - if ( grep( /^$type$/, ('int', 'double'))) { - # https://metacpan.org/pod/JSON#simple-scalars - # numify it, ensuring it will be dumped as a number - return undef unless defined $data; - return $data + 0; - } elsif ($type eq 'string') { - # https://metacpan.org/pod/JSON#simple-scalars - # stringified - return undef unless defined $data; - return $data . q(); - } elsif ($type eq 'boolean') { - # https://metacpan.org/pod/JSON#JSON::true,-JSON::false,-JSON::null - return $data ? \1 : \0; - } elsif ($type eq 'DATE') { - return undef unless defined $data; - if (ref($data) eq 'DateTime') { - # https://metacpan.org/pod/DateTime#$dt-%3Eymd($optional_separator),-$dt-%3Emdy(...),-$dt-%3Edmy(...) - return $data->ymd; - } - return $data .q(); - } elsif ($type eq 'DATE_TIME') { - return undef unless defined $data; - # the date-time notation as defined by RFC 3339, section 5.6, for example, 2017-07-21T17:32:28Z - if (ref($data) eq 'DateTime') { - # https://metacpan.org/pod/DateTime#$dt-%3Erfc3339 - return $data->rfc3339; - } - return $data .q(); - } else { # hash (model), In this case, the TO_JSON of the $data object is executed - return $data; - } -} - -# from Perl hashref -sub from_hash { - my ($self, $hash) = @_; - - # loop through attributes and use openapi_types to deserialize the data - while ( my ($_key, $_type) = each %{$self->openapi_types} ) { - my $_json_attribute = $self->attribute_map->{$_key}; - if ($_type =~ /^array\[(.+)\]$/i) { # array - my $_subclass = $1; - my @_array = (); - foreach my $_element (@{$hash->{$_json_attribute}}) { - push @_array, $self->_deserialize($_subclass, $_element); - } - $self->{$_key} = \@_array; - } elsif ($_type =~ /^hash\[string,(.+)\]$/i) { # hash - my $_subclass = $1; - my %_hash = (); - while (my($_key, $_element) = each %{$hash->{$_json_attribute}}) { - $_hash{$_key} = $self->_deserialize($_subclass, $_element); - } - $self->{$_key} = \%_hash; - } elsif (exists $hash->{$_json_attribute}) { #hash(model), primitive, datetime - $self->{$_key} = $self->_deserialize($_type, $hash->{$_json_attribute}); - } else { - $log->debugf("Warning: %s (%s) does not exist in input hash\n", $_key, $_json_attribute); - } - } - - return $self; -} - -# deserialize non-array data -sub _deserialize { - my ($self, $type, $data) = @_; - $log->debugf("deserializing %s with %s",Dumper($data), $type); - - if (grep( /^$type$/ , ('DATE_TIME', 'DATE'))) { - return DateTime->from_epoch(epoch => str2time($data)); - } elsif ( grep( /^$type$/, ('int', 'double'))) { - return undef unless defined $data; - return $data + 0; - } elsif ($type eq 'string') { - return undef unless defined $data; - return $data . q(); - } elsif ($type eq 'boolean') { - return !!$data; - } else { # hash(model) - my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()"; - return $_instance->from_hash($data); - } -} - - -__PACKAGE__->class_documentation({description => '', - class => 'CatAllOf', - required => [], # TODO -} ); - -__PACKAGE__->method_documentation({ - 'declawed' => { - datatype => 'boolean', - base_name => 'declawed', - description => '', - format => '', - read_only => '', - }, -}); - -__PACKAGE__->openapi_types( { - 'declawed' => 'boolean' -} ); - -__PACKAGE__->attribute_map( { - 'declawed' => 'declawed' -} ); - -__PACKAGE__->mk_accessors(keys %{__PACKAGE__->attribute_map}); - - -1; diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/DogAllOf.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/DogAllOf.pm deleted file mode 100644 index f75f7f41068..00000000000 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/DogAllOf.pm +++ /dev/null @@ -1,242 +0,0 @@ -=begin comment - -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: \" \\ - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech - -=end comment - -=cut - -# -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# Do not edit the class manually. -# Ref: https://openapi-generator.tech -# -package WWW::OpenAPIClient::Object::DogAllOf; - -require 5.6.0; -use strict; -use warnings; -use utf8; -use JSON qw(decode_json); -use Data::Dumper; -use Module::Runtime qw(use_module); -use Log::Any qw($log); -use Date::Parse; -use DateTime; - - -use base ("Class::Accessor", "Class::Data::Inheritable"); - -# -# -# -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). Do not edit the class manually. -# REF: https://openapi-generator.tech -# - -=begin comment - -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: \" \\ - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech - -=end comment - -=cut - -# -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# Do not edit the class manually. -# Ref: https://openapi-generator.tech -# -__PACKAGE__->mk_classdata('attribute_map' => {}); -__PACKAGE__->mk_classdata('openapi_types' => {}); -__PACKAGE__->mk_classdata('method_documentation' => {}); -__PACKAGE__->mk_classdata('class_documentation' => {}); - -# new plain object -sub new { - my ($class, %args) = @_; - - my $self = bless {}, $class; - - $self->init(%args); - - return $self; -} - -# initialize the object -sub init -{ - my ($self, %args) = @_; - - foreach my $attribute (keys %{$self->attribute_map}) { - my $args_key = $self->attribute_map->{$attribute}; - $self->$attribute( $args{ $args_key } ); - } -} - -# return perl hash -sub to_hash { - my $self = shift; - my $_hash = decode_json(JSON->new->convert_blessed->encode($self)); - - return $_hash; -} - -# used by JSON for serialization -sub TO_JSON { - my $self = shift; - my $_data = {}; - foreach my $_key (keys %{$self->attribute_map}) { - if (defined $self->{$_key}) { - my $_json_attribute = $self->attribute_map->{$_key}; - my $_type = $self->openapi_types->{$_key}; - my $_value = $self->{$_key}; - if ($_type =~ /^array\[(.+)\]$/i) { # array - my $_subclass = $1; - $_data->{$_json_attribute} = [ map { $self->_to_json_primitives($_subclass, $_) } @$_value ]; - } elsif ($_type =~ /^hash\[string,(.+)\]$/i) { # hash - my $_subclass = $1; - my %_hash = (); - while (my($_key, $_element) = each %{$_value}) { - $_hash{$_key} = $self->_to_json_primitives($_subclass, $_element); - } - $_data->{$_json_attribute} = \%_hash; - } elsif ( grep( /^$_type$/, ('int', 'double', 'string', 'boolean', 'DATE', 'DATE_TIME'))) { - $_data->{$_json_attribute} = $self->_to_json_primitives($_type, $_value); - } else { - $_data->{$_json_attribute} = $_value; - } - } - } - - return $_data; -} - -# to_json non-array data -sub _to_json_primitives { - my ($self, $type, $data) = @_; - if ( grep( /^$type$/, ('int', 'double'))) { - # https://metacpan.org/pod/JSON#simple-scalars - # numify it, ensuring it will be dumped as a number - return undef unless defined $data; - return $data + 0; - } elsif ($type eq 'string') { - # https://metacpan.org/pod/JSON#simple-scalars - # stringified - return undef unless defined $data; - return $data . q(); - } elsif ($type eq 'boolean') { - # https://metacpan.org/pod/JSON#JSON::true,-JSON::false,-JSON::null - return $data ? \1 : \0; - } elsif ($type eq 'DATE') { - return undef unless defined $data; - if (ref($data) eq 'DateTime') { - # https://metacpan.org/pod/DateTime#$dt-%3Eymd($optional_separator),-$dt-%3Emdy(...),-$dt-%3Edmy(...) - return $data->ymd; - } - return $data .q(); - } elsif ($type eq 'DATE_TIME') { - return undef unless defined $data; - # the date-time notation as defined by RFC 3339, section 5.6, for example, 2017-07-21T17:32:28Z - if (ref($data) eq 'DateTime') { - # https://metacpan.org/pod/DateTime#$dt-%3Erfc3339 - return $data->rfc3339; - } - return $data .q(); - } else { # hash (model), In this case, the TO_JSON of the $data object is executed - return $data; - } -} - -# from Perl hashref -sub from_hash { - my ($self, $hash) = @_; - - # loop through attributes and use openapi_types to deserialize the data - while ( my ($_key, $_type) = each %{$self->openapi_types} ) { - my $_json_attribute = $self->attribute_map->{$_key}; - if ($_type =~ /^array\[(.+)\]$/i) { # array - my $_subclass = $1; - my @_array = (); - foreach my $_element (@{$hash->{$_json_attribute}}) { - push @_array, $self->_deserialize($_subclass, $_element); - } - $self->{$_key} = \@_array; - } elsif ($_type =~ /^hash\[string,(.+)\]$/i) { # hash - my $_subclass = $1; - my %_hash = (); - while (my($_key, $_element) = each %{$hash->{$_json_attribute}}) { - $_hash{$_key} = $self->_deserialize($_subclass, $_element); - } - $self->{$_key} = \%_hash; - } elsif (exists $hash->{$_json_attribute}) { #hash(model), primitive, datetime - $self->{$_key} = $self->_deserialize($_type, $hash->{$_json_attribute}); - } else { - $log->debugf("Warning: %s (%s) does not exist in input hash\n", $_key, $_json_attribute); - } - } - - return $self; -} - -# deserialize non-array data -sub _deserialize { - my ($self, $type, $data) = @_; - $log->debugf("deserializing %s with %s",Dumper($data), $type); - - if (grep( /^$type$/ , ('DATE_TIME', 'DATE'))) { - return DateTime->from_epoch(epoch => str2time($data)); - } elsif ( grep( /^$type$/, ('int', 'double'))) { - return undef unless defined $data; - return $data + 0; - } elsif ($type eq 'string') { - return undef unless defined $data; - return $data . q(); - } elsif ($type eq 'boolean') { - return !!$data; - } else { # hash(model) - my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()"; - return $_instance->from_hash($data); - } -} - - -__PACKAGE__->class_documentation({description => '', - class => 'DogAllOf', - required => [], # TODO -} ); - -__PACKAGE__->method_documentation({ - 'breed' => { - datatype => 'string', - base_name => 'breed', - description => '', - format => '', - read_only => '', - }, -}); - -__PACKAGE__->openapi_types( { - 'breed' => 'string' -} ); - -__PACKAGE__->attribute_map( { - 'breed' => 'breed' -} ); - -__PACKAGE__->mk_accessors(keys %{__PACKAGE__->attribute_map}); - - -1; diff --git a/samples/client/petstore/perl/t/CatAllOfTest.t b/samples/client/petstore/perl/t/CatAllOfTest.t deleted file mode 100644 index 67d33cf5d32..00000000000 --- a/samples/client/petstore/perl/t/CatAllOfTest.t +++ /dev/null @@ -1,34 +0,0 @@ -=begin comment - -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: \" \\ - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech - -=end comment - -=cut - -# -# NOTE: This class is auto generated by the OpenAPI Generator -# Please update the test cases below to test the model. -# Ref: https://openapi-generator.tech -# -use Test::More tests => 2; -use Test::Exception; - -use lib 'lib'; -use strict; -use warnings; - - -use_ok('WWW::OpenAPIClient::Object::CatAllOf'); - -# uncomment below and update the test -#my $instance = WWW::OpenAPIClient::Object::CatAllOf->new(); -# -#isa_ok($instance, 'WWW::OpenAPIClient::Object::CatAllOf'); - diff --git a/samples/client/petstore/perl/t/DogAllOfTest.t b/samples/client/petstore/perl/t/DogAllOfTest.t deleted file mode 100644 index 6660506bf9e..00000000000 --- a/samples/client/petstore/perl/t/DogAllOfTest.t +++ /dev/null @@ -1,34 +0,0 @@ -=begin comment - -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: \" \\ - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech - -=end comment - -=cut - -# -# NOTE: This class is auto generated by the OpenAPI Generator -# Please update the test cases below to test the model. -# Ref: https://openapi-generator.tech -# -use Test::More tests => 2; -use Test::Exception; - -use lib 'lib'; -use strict; -use warnings; - - -use_ok('WWW::OpenAPIClient::Object::DogAllOf'); - -# uncomment below and update the test -#my $instance = WWW::OpenAPIClient::Object::DogAllOf->new(); -# -#isa_ok($instance, 'WWW::OpenAPIClient::Object::DogAllOf'); - diff --git a/samples/client/petstore/php/OpenAPIClient-php/.openapi-generator/FILES b/samples/client/petstore/php/OpenAPIClient-php/.openapi-generator/FILES index b496a9db963..986d516709c 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/.openapi-generator/FILES +++ b/samples/client/petstore/php/OpenAPIClient-php/.openapi-generator/FILES @@ -19,13 +19,11 @@ docs/Model/ArrayOfNumberOnly.md docs/Model/ArrayTest.md docs/Model/Capitalization.md docs/Model/Cat.md -docs/Model/CatAllOf.md docs/Model/Category.md docs/Model/ClassModel.md docs/Model/Client.md docs/Model/DeprecatedObject.md docs/Model/Dog.md -docs/Model/DogAllOf.md docs/Model/EnumArrays.md docs/Model/EnumClass.md docs/Model/EnumTest.md @@ -79,13 +77,11 @@ lib/Model/ArrayOfNumberOnly.php lib/Model/ArrayTest.php lib/Model/Capitalization.php lib/Model/Cat.php -lib/Model/CatAllOf.php lib/Model/Category.php lib/Model/ClassModel.php lib/Model/Client.php lib/Model/DeprecatedObject.php lib/Model/Dog.php -lib/Model/DogAllOf.php lib/Model/EnumArrays.php lib/Model/EnumClass.php lib/Model/EnumTest.php diff --git a/samples/client/petstore/php/OpenAPIClient-php/README.md b/samples/client/petstore/php/OpenAPIClient-php/README.md index c8434e634d9..d79273d320c 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/README.md +++ b/samples/client/petstore/php/OpenAPIClient-php/README.md @@ -126,13 +126,11 @@ Class | Method | HTTP request | Description - [ArrayTest](docs/Model/ArrayTest.md) - [Capitalization](docs/Model/Capitalization.md) - [Cat](docs/Model/Cat.md) -- [CatAllOf](docs/Model/CatAllOf.md) - [Category](docs/Model/Category.md) - [ClassModel](docs/Model/ClassModel.md) - [Client](docs/Model/Client.md) - [DeprecatedObject](docs/Model/DeprecatedObject.md) - [Dog](docs/Model/Dog.md) -- [DogAllOf](docs/Model/DogAllOf.md) - [EnumArrays](docs/Model/EnumArrays.md) - [EnumClass](docs/Model/EnumClass.md) - [EnumTest](docs/Model/EnumTest.md) diff --git a/samples/client/petstore/php/OpenAPIClient-php/docs/Model/CatAllOf.md b/samples/client/petstore/php/OpenAPIClient-php/docs/Model/CatAllOf.md deleted file mode 100644 index 3452570c1e7..00000000000 --- a/samples/client/petstore/php/OpenAPIClient-php/docs/Model/CatAllOf.md +++ /dev/null @@ -1,9 +0,0 @@ -# # CatAllOf - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**declawed** | **bool** | | [optional] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/php/OpenAPIClient-php/docs/Model/DogAllOf.md b/samples/client/petstore/php/OpenAPIClient-php/docs/Model/DogAllOf.md deleted file mode 100644 index 88effd4297b..00000000000 --- a/samples/client/petstore/php/OpenAPIClient-php/docs/Model/DogAllOf.md +++ /dev/null @@ -1,9 +0,0 @@ -# # DogAllOf - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**breed** | **string** | | [optional] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/CatAllOf.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/CatAllOf.php deleted file mode 100644 index 8955aada08f..00000000000 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/CatAllOf.php +++ /dev/null @@ -1,409 +0,0 @@ - - */ -class CatAllOf implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'Cat_allOf'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'declawed' => 'bool' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'declawed' => null - ]; - - /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ - protected static array $openAPINullables = [ - 'declawed' => false - ]; - - /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ - protected array $openAPINullablesSetToNull = []; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of nullable properties - * - * @return array - */ - protected static function openAPINullables(): array - { - return self::$openAPINullables; - } - - /** - * Array of nullable field names deliberately set to null - * - * @return boolean[] - */ - private function getOpenAPINullablesSetToNull(): array - { - return $this->openAPINullablesSetToNull; - } - - /** - * Setter - Array of nullable field names deliberately set to null - * - * @param boolean[] $openAPINullablesSetToNull - */ - private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void - { - $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; - } - - /** - * Checks if a property is nullable - * - * @param string $property - * @return bool - */ - public static function isNullable(string $property): bool - { - return self::openAPINullables()[$property] ?? false; - } - - /** - * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool - */ - public function isNullableSetToNull(string $property): bool - { - return in_array($property, $this->getOpenAPINullablesSetToNull(), true); - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'declawed' => 'declawed' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'declawed' => 'setDeclawed' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'declawed' => 'getDeclawed' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->setIfExists('declawed', $data ?? [], null); - } - - /** - * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName - * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the - * $this->openAPINullablesSetToNull array - * - * @param string $variableName - * @param array $fields - * @param mixed $defaultValue - */ - private function setIfExists(string $variableName, array $fields, $defaultValue): void - { - if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { - $this->openAPINullablesSetToNull[] = $variableName; - } - - $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets declawed - * - * @return bool|null - */ - public function getDeclawed() - { - return $this->container['declawed']; - } - - /** - * Sets declawed - * - * @param bool|null $declawed declawed - * - * @return self - */ - public function setDeclawed($declawed) - { - if (is_null($declawed)) { - throw new \InvalidArgumentException('non-nullable declawed cannot be null'); - } - $this->container['declawed'] = $declawed; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - #[\ReturnTypeWillChange] - public function jsonSerialize() - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/DogAllOf.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/DogAllOf.php deleted file mode 100644 index 7892696c0bc..00000000000 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/DogAllOf.php +++ /dev/null @@ -1,409 +0,0 @@ - - */ -class DogAllOf implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'Dog_allOf'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'breed' => 'string' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'breed' => null - ]; - - /** - * Array of nullable properties. Used for (de)serialization - * - * @var boolean[] - */ - protected static array $openAPINullables = [ - 'breed' => false - ]; - - /** - * If a nullable field gets set to null, insert it here - * - * @var boolean[] - */ - protected array $openAPINullablesSetToNull = []; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of nullable properties - * - * @return array - */ - protected static function openAPINullables(): array - { - return self::$openAPINullables; - } - - /** - * Array of nullable field names deliberately set to null - * - * @return boolean[] - */ - private function getOpenAPINullablesSetToNull(): array - { - return $this->openAPINullablesSetToNull; - } - - /** - * Setter - Array of nullable field names deliberately set to null - * - * @param boolean[] $openAPINullablesSetToNull - */ - private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void - { - $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; - } - - /** - * Checks if a property is nullable - * - * @param string $property - * @return bool - */ - public static function isNullable(string $property): bool - { - return self::openAPINullables()[$property] ?? false; - } - - /** - * Checks if a nullable property is set to null. - * - * @param string $property - * @return bool - */ - public function isNullableSetToNull(string $property): bool - { - return in_array($property, $this->getOpenAPINullablesSetToNull(), true); - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'breed' => 'breed' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'breed' => 'setBreed' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'breed' => 'getBreed' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->setIfExists('breed', $data ?? [], null); - } - - /** - * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName - * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the - * $this->openAPINullablesSetToNull array - * - * @param string $variableName - * @param array $fields - * @param mixed $defaultValue - */ - private function setIfExists(string $variableName, array $fields, $defaultValue): void - { - if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { - $this->openAPINullablesSetToNull[] = $variableName; - } - - $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets breed - * - * @return string|null - */ - public function getBreed() - { - return $this->container['breed']; - } - - /** - * Sets breed - * - * @param string|null $breed breed - * - * @return self - */ - public function setBreed($breed) - { - if (is_null($breed)) { - throw new \InvalidArgumentException('non-nullable breed cannot be null'); - } - $this->container['breed'] = $breed; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - #[\ReturnTypeWillChange] - public function jsonSerialize() - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/AllOfWithSingleRefTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/AllOfWithSingleRefTest.php index 472adba5dba..ed452159ebf 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/AllOfWithSingleRefTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Model/AllOfWithSingleRefTest.php @@ -17,7 +17,7 @@ * * The version of the OpenAPI document: 1.0.0 * Generated by: https://openapi-generator.tech - * OpenAPI Generator version: 6.1.0-SNAPSHOT + * OpenAPI Generator version: 7.0.0-SNAPSHOT */ /** diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/CatAllOfTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/CatAllOfTest.php deleted file mode 100644 index 469a2cbe3e7..00000000000 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/CatAllOfTest.php +++ /dev/null @@ -1,90 +0,0 @@ -markTestIncomplete('Not implemented'); - } - - /** - * Test attribute "declawed" - */ - public function testPropertyDeclawed() - { - // TODO: implement - $this->markTestIncomplete('Not implemented'); - } -} diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Model/DogAllOfTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Model/DogAllOfTest.php deleted file mode 100644 index efd7ae0ec4a..00000000000 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Model/DogAllOfTest.php +++ /dev/null @@ -1,90 +0,0 @@ -markTestIncomplete('Not implemented'); - } - - /** - * Test attribute "breed" - */ - public function testPropertyBreed() - { - // TODO: implement - $this->markTestIncomplete('Not implemented'); - } -} diff --git a/samples/client/petstore/powershell/.openapi-generator/FILES b/samples/client/petstore/powershell/.openapi-generator/FILES index 1b7323c44b9..13c81a7d5a1 100644 --- a/samples/client/petstore/powershell/.openapi-generator/FILES +++ b/samples/client/petstore/powershell/.openapi-generator/FILES @@ -15,7 +15,6 @@ docs/BananaReq.md docs/BasquePig.md docs/Capitalization.md docs/Cat.md -docs/CatAllOf.md docs/Category.md docs/ClassModel.md docs/Client.md @@ -23,7 +22,6 @@ docs/ComplexQuadrilateral.md docs/DanishPig.md docs/DeprecatedObject.md docs/Dog.md -docs/DogAllOf.md docs/Drawing.md docs/EnumArrays.md docs/EnumTest.md @@ -103,7 +101,6 @@ src/PSPetstore/Model/BananaReq.ps1 src/PSPetstore/Model/BasquePig.ps1 src/PSPetstore/Model/Capitalization.ps1 src/PSPetstore/Model/Cat.ps1 -src/PSPetstore/Model/CatAllOf.ps1 src/PSPetstore/Model/Category.ps1 src/PSPetstore/Model/ClassModel.ps1 src/PSPetstore/Model/Client.ps1 @@ -111,7 +108,6 @@ src/PSPetstore/Model/ComplexQuadrilateral.ps1 src/PSPetstore/Model/DanishPig.ps1 src/PSPetstore/Model/DeprecatedObject.ps1 src/PSPetstore/Model/Dog.ps1 -src/PSPetstore/Model/DogAllOf.ps1 src/PSPetstore/Model/Drawing.ps1 src/PSPetstore/Model/EnumArrays.ps1 src/PSPetstore/Model/EnumTest.ps1 diff --git a/samples/client/petstore/powershell/README.md b/samples/client/petstore/powershell/README.md index 0c5467c93b4..d76019beba9 100644 --- a/samples/client/petstore/powershell/README.md +++ b/samples/client/petstore/powershell/README.md @@ -111,7 +111,6 @@ Class | Method | HTTP request | Description - [PSPetstore/Model.BasquePig](docs/BasquePig.md) - [PSPetstore/Model.Capitalization](docs/Capitalization.md) - [PSPetstore/Model.Cat](docs/Cat.md) - - [PSPetstore/Model.CatAllOf](docs/CatAllOf.md) - [PSPetstore/Model.Category](docs/Category.md) - [PSPetstore/Model.ClassModel](docs/ClassModel.md) - [PSPetstore/Model.Client](docs/Client.md) @@ -119,7 +118,6 @@ Class | Method | HTTP request | Description - [PSPetstore/Model.DanishPig](docs/DanishPig.md) - [PSPetstore/Model.DeprecatedObject](docs/DeprecatedObject.md) - [PSPetstore/Model.Dog](docs/Dog.md) - - [PSPetstore/Model.DogAllOf](docs/DogAllOf.md) - [PSPetstore/Model.Drawing](docs/Drawing.md) - [PSPetstore/Model.EnumArrays](docs/EnumArrays.md) - [PSPetstore/Model.EnumTest](docs/EnumTest.md) diff --git a/samples/client/petstore/powershell/docs/CatAllOf.md b/samples/client/petstore/powershell/docs/CatAllOf.md deleted file mode 100644 index 451db0fa20b..00000000000 --- a/samples/client/petstore/powershell/docs/CatAllOf.md +++ /dev/null @@ -1,21 +0,0 @@ -# CatAllOf -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Declawed** | **Boolean** | | [optional] - -## Examples - -- Prepare the resource -```powershell -$CatAllOf = Initialize-PSPetstoreCatAllOf -Declawed null -``` - -- Convert the resource to JSON -```powershell -$CatAllOf | ConvertTo-JSON -``` - -[[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/powershell/docs/DogAllOf.md b/samples/client/petstore/powershell/docs/DogAllOf.md deleted file mode 100644 index 73337ad7405..00000000000 --- a/samples/client/petstore/powershell/docs/DogAllOf.md +++ /dev/null @@ -1,21 +0,0 @@ -# DogAllOf -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Breed** | **String** | | [optional] - -## Examples - -- Prepare the resource -```powershell -$DogAllOf = Initialize-PSPetstoreDogAllOf -Breed null -``` - -- Convert the resource to JSON -```powershell -$DogAllOf | ConvertTo-JSON -``` - -[[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/powershell/src/PSPetstore/Model/CatAllOf.ps1 b/samples/client/petstore/powershell/src/PSPetstore/Model/CatAllOf.ps1 deleted file mode 100644 index 1e57f437b5f..00000000000 --- a/samples/client/petstore/powershell/src/PSPetstore/Model/CatAllOf.ps1 +++ /dev/null @@ -1,97 +0,0 @@ -# -# 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: "" \ -# Version: 1.0.0 -# Generated by OpenAPI Generator: https://openapi-generator.tech -# - -<# -.SYNOPSIS - -No summary available. - -.DESCRIPTION - -No description available. - -.PARAMETER Declawed -No description available. -.OUTPUTS - -CatAllOf -#> - -function Initialize-PSCatAllOf { - [CmdletBinding()] - Param ( - [Parameter(Position = 0, ValueFromPipelineByPropertyName = $true)] - [System.Nullable[Boolean]] - ${Declawed} - ) - - Process { - 'Creating PSCustomObject: PSPetstore => PSCatAllOf' | Write-Debug - $PSBoundParameters | Out-DebugParameter | Write-Debug - - - $PSO = [PSCustomObject]@{ - "declawed" = ${Declawed} - } - - - return $PSO - } -} - -<# -.SYNOPSIS - -Convert from JSON to CatAllOf - -.DESCRIPTION - -Convert from JSON to CatAllOf - -.PARAMETER Json - -Json object - -.OUTPUTS - -CatAllOf -#> -function ConvertFrom-PSJsonToCatAllOf { - Param( - [AllowEmptyString()] - [string]$Json - ) - - Process { - 'Converting JSON to PSCustomObject: PSPetstore => PSCatAllOf' | Write-Debug - $PSBoundParameters | Out-DebugParameter | Write-Debug - - $JsonParameters = ConvertFrom-Json -InputObject $Json - - # check if Json contains properties not defined in PSCatAllOf - $AllProperties = ("declawed") - foreach ($name in $JsonParameters.PsObject.Properties.Name) { - if (!($AllProperties.Contains($name))) { - throw "Error! JSON key '$name' not found in the properties: $($AllProperties)" - } - } - - if (!([bool]($JsonParameters.PSobject.Properties.name -match "declawed"))) { #optional property not found - $Declawed = $null - } else { - $Declawed = $JsonParameters.PSobject.Properties["declawed"].value - } - - $PSO = [PSCustomObject]@{ - "declawed" = ${Declawed} - } - - return $PSO - } - -} - diff --git a/samples/client/petstore/powershell/src/PSPetstore/Model/DogAllOf.ps1 b/samples/client/petstore/powershell/src/PSPetstore/Model/DogAllOf.ps1 deleted file mode 100644 index 7737af53e41..00000000000 --- a/samples/client/petstore/powershell/src/PSPetstore/Model/DogAllOf.ps1 +++ /dev/null @@ -1,97 +0,0 @@ -# -# 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: "" \ -# Version: 1.0.0 -# Generated by OpenAPI Generator: https://openapi-generator.tech -# - -<# -.SYNOPSIS - -No summary available. - -.DESCRIPTION - -No description available. - -.PARAMETER Breed -No description available. -.OUTPUTS - -DogAllOf -#> - -function Initialize-PSDogAllOf { - [CmdletBinding()] - Param ( - [Parameter(Position = 0, ValueFromPipelineByPropertyName = $true)] - [String] - ${Breed} - ) - - Process { - 'Creating PSCustomObject: PSPetstore => PSDogAllOf' | Write-Debug - $PSBoundParameters | Out-DebugParameter | Write-Debug - - - $PSO = [PSCustomObject]@{ - "breed" = ${Breed} - } - - - return $PSO - } -} - -<# -.SYNOPSIS - -Convert from JSON to DogAllOf - -.DESCRIPTION - -Convert from JSON to DogAllOf - -.PARAMETER Json - -Json object - -.OUTPUTS - -DogAllOf -#> -function ConvertFrom-PSJsonToDogAllOf { - Param( - [AllowEmptyString()] - [string]$Json - ) - - Process { - 'Converting JSON to PSCustomObject: PSPetstore => PSDogAllOf' | Write-Debug - $PSBoundParameters | Out-DebugParameter | Write-Debug - - $JsonParameters = ConvertFrom-Json -InputObject $Json - - # check if Json contains properties not defined in PSDogAllOf - $AllProperties = ("breed") - foreach ($name in $JsonParameters.PsObject.Properties.Name) { - if (!($AllProperties.Contains($name))) { - throw "Error! JSON key '$name' not found in the properties: $($AllProperties)" - } - } - - if (!([bool]($JsonParameters.PSobject.Properties.name -match "breed"))) { #optional property not found - $Breed = $null - } else { - $Breed = $JsonParameters.PSobject.Properties["breed"].value - } - - $PSO = [PSCustomObject]@{ - "breed" = ${Breed} - } - - return $PSO - } - -} - diff --git a/samples/client/petstore/powershell/tests/Model/CatAllOf.Tests.ps1 b/samples/client/petstore/powershell/tests/Model/CatAllOf.Tests.ps1 deleted file mode 100644 index 49a7a4862c5..00000000000 --- a/samples/client/petstore/powershell/tests/Model/CatAllOf.Tests.ps1 +++ /dev/null @@ -1,17 +0,0 @@ -# -# 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: "" \ -# Version: 1.0.0 -# Generated by OpenAPI Generator: https://openapi-generator.tech -# - -Describe -tag 'PSPetstore' -name 'PSCatAllOf' { - Context 'PSCatAllOf' { - It 'Initialize-PSCatAllOf' { - # a simple test to create an object - #$NewObject = Initialize-PSCatAllOf -Declawed "TEST_VALUE" - #$NewObject | Should -BeOfType CatAllOf - #$NewObject.property | Should -Be 0 - } - } -} diff --git a/samples/client/petstore/powershell/tests/Model/DogAllOf.Tests.ps1 b/samples/client/petstore/powershell/tests/Model/DogAllOf.Tests.ps1 deleted file mode 100644 index 574addf84d2..00000000000 --- a/samples/client/petstore/powershell/tests/Model/DogAllOf.Tests.ps1 +++ /dev/null @@ -1,17 +0,0 @@ -# -# 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: "" \ -# Version: 1.0.0 -# Generated by OpenAPI Generator: https://openapi-generator.tech -# - -Describe -tag 'PSPetstore' -name 'PSDogAllOf' { - Context 'PSDogAllOf' { - It 'Initialize-PSDogAllOf' { - # a simple test to create an object - #$NewObject = Initialize-PSDogAllOf -Breed "TEST_VALUE" - #$NewObject | Should -BeOfType DogAllOf - #$NewObject.property | Should -Be 0 - } - } -} diff --git a/samples/client/petstore/ruby-autoload/.openapi-generator/FILES b/samples/client/petstore/ruby-autoload/.openapi-generator/FILES index ee516e123ab..ed16a1e03d1 100644 --- a/samples/client/petstore/ruby-autoload/.openapi-generator/FILES +++ b/samples/client/petstore/ruby-autoload/.openapi-generator/FILES @@ -16,14 +16,12 @@ docs/ArrayOfNumberOnly.md docs/ArrayTest.md docs/Capitalization.md docs/Cat.md -docs/CatAllOf.md docs/Category.md docs/ClassModel.md docs/Client.md docs/DefaultApi.md docs/DeprecatedObject.md docs/Dog.md -docs/DogAllOf.md docs/EnumArrays.md docs/EnumClass.md docs/EnumTest.md @@ -83,13 +81,11 @@ lib/petstore/models/array_of_number_only.rb lib/petstore/models/array_test.rb lib/petstore/models/capitalization.rb lib/petstore/models/cat.rb -lib/petstore/models/cat_all_of.rb lib/petstore/models/category.rb lib/petstore/models/class_model.rb lib/petstore/models/client.rb lib/petstore/models/deprecated_object.rb lib/petstore/models/dog.rb -lib/petstore/models/dog_all_of.rb lib/petstore/models/enum_arrays.rb lib/petstore/models/enum_class.rb lib/petstore/models/enum_test.rb diff --git a/samples/client/petstore/ruby-autoload/README.md b/samples/client/petstore/ruby-autoload/README.md index 449dc151820..24656471c4b 100644 --- a/samples/client/petstore/ruby-autoload/README.md +++ b/samples/client/petstore/ruby-autoload/README.md @@ -130,13 +130,11 @@ Class | Method | HTTP request | Description - [Petstore::ArrayTest](docs/ArrayTest.md) - [Petstore::Capitalization](docs/Capitalization.md) - [Petstore::Cat](docs/Cat.md) - - [Petstore::CatAllOf](docs/CatAllOf.md) - [Petstore::Category](docs/Category.md) - [Petstore::ClassModel](docs/ClassModel.md) - [Petstore::Client](docs/Client.md) - [Petstore::DeprecatedObject](docs/DeprecatedObject.md) - [Petstore::Dog](docs/Dog.md) - - [Petstore::DogAllOf](docs/DogAllOf.md) - [Petstore::EnumArrays](docs/EnumArrays.md) - [Petstore::EnumClass](docs/EnumClass.md) - [Petstore::EnumTest](docs/EnumTest.md) diff --git a/samples/client/petstore/ruby-autoload/docs/CatAllOf.md b/samples/client/petstore/ruby-autoload/docs/CatAllOf.md deleted file mode 100644 index 8d91ec5d6eb..00000000000 --- a/samples/client/petstore/ruby-autoload/docs/CatAllOf.md +++ /dev/null @@ -1,18 +0,0 @@ -# Petstore::CatAllOf - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **declawed** | **Boolean** | | [optional] | - -## Example - -```ruby -require 'petstore' - -instance = Petstore::CatAllOf.new( - declawed: null -) -``` - diff --git a/samples/client/petstore/ruby-autoload/docs/DogAllOf.md b/samples/client/petstore/ruby-autoload/docs/DogAllOf.md deleted file mode 100644 index e0e7a831d0e..00000000000 --- a/samples/client/petstore/ruby-autoload/docs/DogAllOf.md +++ /dev/null @@ -1,18 +0,0 @@ -# Petstore::DogAllOf - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **breed** | **String** | | [optional] | - -## Example - -```ruby -require 'petstore' - -instance = Petstore::DogAllOf.new( - breed: null -) -``` - diff --git a/samples/client/petstore/ruby-autoload/lib/petstore.rb b/samples/client/petstore/ruby-autoload/lib/petstore.rb index 1c062807f4b..dbec1c1b2f0 100644 --- a/samples/client/petstore/ruby-autoload/lib/petstore.rb +++ b/samples/client/petstore/ruby-autoload/lib/petstore.rb @@ -26,13 +26,11 @@ Petstore.autoload :ArrayOfNumberOnly, 'petstore/models/array_of_number_only' Petstore.autoload :ArrayTest, 'petstore/models/array_test' Petstore.autoload :Capitalization, 'petstore/models/capitalization' Petstore.autoload :Cat, 'petstore/models/cat' -Petstore.autoload :CatAllOf, 'petstore/models/cat_all_of' Petstore.autoload :Category, 'petstore/models/category' Petstore.autoload :ClassModel, 'petstore/models/class_model' Petstore.autoload :Client, 'petstore/models/client' Petstore.autoload :DeprecatedObject, 'petstore/models/deprecated_object' Petstore.autoload :Dog, 'petstore/models/dog' -Petstore.autoload :DogAllOf, 'petstore/models/dog_all_of' Petstore.autoload :EnumArrays, 'petstore/models/enum_arrays' Petstore.autoload :EnumClass, 'petstore/models/enum_class' Petstore.autoload :EnumTest, 'petstore/models/enum_test' diff --git a/samples/client/petstore/ruby-autoload/lib/petstore/models/cat.rb b/samples/client/petstore/ruby-autoload/lib/petstore/models/cat.rb index 60520613679..59cc06ceae5 100644 --- a/samples/client/petstore/ruby-autoload/lib/petstore/models/cat.rb +++ b/samples/client/petstore/ruby-autoload/lib/petstore/models/cat.rb @@ -45,8 +45,7 @@ module Petstore # List of class defined in allOf (OpenAPI v3) def self.openapi_all_of [ - :'Animal', - :'CatAllOf' + :'Animal' ] end diff --git a/samples/client/petstore/ruby-autoload/lib/petstore/models/cat_all_of.rb b/samples/client/petstore/ruby-autoload/lib/petstore/models/cat_all_of.rb deleted file mode 100644 index 5b3371e65e8..00000000000 --- a/samples/client/petstore/ruby-autoload/lib/petstore/models/cat_all_of.rb +++ /dev/null @@ -1,219 +0,0 @@ -=begin -#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: \" \\ - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0-SNAPSHOT - -=end - -require 'date' -require 'time' - -module Petstore - class CatAllOf - attr_accessor :declawed - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'declawed' => :'declawed' - } - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'declawed' => :'Boolean' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `Petstore::CatAllOf` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Petstore::CatAllOf`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'declawed') - self.declawed = attributes[:'declawed'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - declawed == o.declawed - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [declawed].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - self.class.openapi_types.each_pair do |key, type| - if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf - klass = Petstore.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - - end - -end diff --git a/samples/client/petstore/ruby-autoload/lib/petstore/models/dog.rb b/samples/client/petstore/ruby-autoload/lib/petstore/models/dog.rb index 29172f20ec9..dbfac124513 100644 --- a/samples/client/petstore/ruby-autoload/lib/petstore/models/dog.rb +++ b/samples/client/petstore/ruby-autoload/lib/petstore/models/dog.rb @@ -45,8 +45,7 @@ module Petstore # List of class defined in allOf (OpenAPI v3) def self.openapi_all_of [ - :'Animal', - :'DogAllOf' + :'Animal' ] end diff --git a/samples/client/petstore/ruby-autoload/lib/petstore/models/dog_all_of.rb b/samples/client/petstore/ruby-autoload/lib/petstore/models/dog_all_of.rb deleted file mode 100644 index f6530920972..00000000000 --- a/samples/client/petstore/ruby-autoload/lib/petstore/models/dog_all_of.rb +++ /dev/null @@ -1,219 +0,0 @@ -=begin -#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: \" \\ - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0-SNAPSHOT - -=end - -require 'date' -require 'time' - -module Petstore - class DogAllOf - attr_accessor :breed - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'breed' => :'breed' - } - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'breed' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `Petstore::DogAllOf` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Petstore::DogAllOf`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'breed') - self.breed = attributes[:'breed'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - breed == o.breed - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [breed].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - self.class.openapi_types.each_pair do |key, type| - if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf - klass = Petstore.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - - end - -end diff --git a/samples/client/petstore/ruby-autoload/spec/models/all_of_with_single_ref_spec.rb b/samples/client/petstore/ruby-autoload/spec/models/all_of_with_single_ref_spec.rb index 6d4e3c88bfa..f13ef665f5d 100644 --- a/samples/client/petstore/ruby-autoload/spec/models/all_of_with_single_ref_spec.rb +++ b/samples/client/petstore/ruby-autoload/spec/models/all_of_with_single_ref_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.1.0-SNAPSHOT +OpenAPI Generator version: 7.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-autoload/spec/models/cat_all_of_spec.rb b/samples/client/petstore/ruby-autoload/spec/models/cat_all_of_spec.rb deleted file mode 100644 index bfc0b0284fc..00000000000 --- a/samples/client/petstore/ruby-autoload/spec/models/cat_all_of_spec.rb +++ /dev/null @@ -1,34 +0,0 @@ -=begin -#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: \" \\ - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.1.0-SNAPSHOT - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for Petstore::CatAllOf -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe Petstore::CatAllOf do - let(:instance) { Petstore::CatAllOf.new } - - describe 'test an instance of CatAllOf' do - it 'should create an instance of CatAllOf' do - expect(instance).to be_instance_of(Petstore::CatAllOf) - end - end - describe 'test attribute "declawed"' do - it 'should work' do - # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ - end - end - -end diff --git a/samples/client/petstore/ruby-autoload/spec/models/dog_all_of_spec.rb b/samples/client/petstore/ruby-autoload/spec/models/dog_all_of_spec.rb deleted file mode 100644 index f04c14afe5f..00000000000 --- a/samples/client/petstore/ruby-autoload/spec/models/dog_all_of_spec.rb +++ /dev/null @@ -1,34 +0,0 @@ -=begin -#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: \" \\ - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.1.0-SNAPSHOT - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for Petstore::DogAllOf -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe Petstore::DogAllOf do - let(:instance) { Petstore::DogAllOf.new } - - describe 'test an instance of DogAllOf' do - it 'should create an instance of DogAllOf' do - expect(instance).to be_instance_of(Petstore::DogAllOf) - end - end - describe 'test attribute "breed"' do - it 'should work' do - # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ - end - end - -end diff --git a/samples/client/petstore/ruby-faraday/.openapi-generator/FILES b/samples/client/petstore/ruby-faraday/.openapi-generator/FILES index ee516e123ab..ed16a1e03d1 100644 --- a/samples/client/petstore/ruby-faraday/.openapi-generator/FILES +++ b/samples/client/petstore/ruby-faraday/.openapi-generator/FILES @@ -16,14 +16,12 @@ docs/ArrayOfNumberOnly.md docs/ArrayTest.md docs/Capitalization.md docs/Cat.md -docs/CatAllOf.md docs/Category.md docs/ClassModel.md docs/Client.md docs/DefaultApi.md docs/DeprecatedObject.md docs/Dog.md -docs/DogAllOf.md docs/EnumArrays.md docs/EnumClass.md docs/EnumTest.md @@ -83,13 +81,11 @@ lib/petstore/models/array_of_number_only.rb lib/petstore/models/array_test.rb lib/petstore/models/capitalization.rb lib/petstore/models/cat.rb -lib/petstore/models/cat_all_of.rb lib/petstore/models/category.rb lib/petstore/models/class_model.rb lib/petstore/models/client.rb lib/petstore/models/deprecated_object.rb lib/petstore/models/dog.rb -lib/petstore/models/dog_all_of.rb lib/petstore/models/enum_arrays.rb lib/petstore/models/enum_class.rb lib/petstore/models/enum_test.rb diff --git a/samples/client/petstore/ruby-faraday/README.md b/samples/client/petstore/ruby-faraday/README.md index 449dc151820..24656471c4b 100644 --- a/samples/client/petstore/ruby-faraday/README.md +++ b/samples/client/petstore/ruby-faraday/README.md @@ -130,13 +130,11 @@ Class | Method | HTTP request | Description - [Petstore::ArrayTest](docs/ArrayTest.md) - [Petstore::Capitalization](docs/Capitalization.md) - [Petstore::Cat](docs/Cat.md) - - [Petstore::CatAllOf](docs/CatAllOf.md) - [Petstore::Category](docs/Category.md) - [Petstore::ClassModel](docs/ClassModel.md) - [Petstore::Client](docs/Client.md) - [Petstore::DeprecatedObject](docs/DeprecatedObject.md) - [Petstore::Dog](docs/Dog.md) - - [Petstore::DogAllOf](docs/DogAllOf.md) - [Petstore::EnumArrays](docs/EnumArrays.md) - [Petstore::EnumClass](docs/EnumClass.md) - [Petstore::EnumTest](docs/EnumTest.md) diff --git a/samples/client/petstore/ruby-faraday/docs/CatAllOf.md b/samples/client/petstore/ruby-faraday/docs/CatAllOf.md deleted file mode 100644 index 8d91ec5d6eb..00000000000 --- a/samples/client/petstore/ruby-faraday/docs/CatAllOf.md +++ /dev/null @@ -1,18 +0,0 @@ -# Petstore::CatAllOf - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **declawed** | **Boolean** | | [optional] | - -## Example - -```ruby -require 'petstore' - -instance = Petstore::CatAllOf.new( - declawed: null -) -``` - diff --git a/samples/client/petstore/ruby-faraday/docs/DogAllOf.md b/samples/client/petstore/ruby-faraday/docs/DogAllOf.md deleted file mode 100644 index e0e7a831d0e..00000000000 --- a/samples/client/petstore/ruby-faraday/docs/DogAllOf.md +++ /dev/null @@ -1,18 +0,0 @@ -# Petstore::DogAllOf - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **breed** | **String** | | [optional] | - -## Example - -```ruby -require 'petstore' - -instance = Petstore::DogAllOf.new( - breed: null -) -``` - diff --git a/samples/client/petstore/ruby-faraday/lib/petstore.rb b/samples/client/petstore/ruby-faraday/lib/petstore.rb index 5f63374527e..551107cffb7 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore.rb @@ -25,12 +25,10 @@ require 'petstore/models/array_of_array_of_number_only' require 'petstore/models/array_of_number_only' require 'petstore/models/array_test' require 'petstore/models/capitalization' -require 'petstore/models/cat_all_of' require 'petstore/models/category' require 'petstore/models/class_model' require 'petstore/models/client' require 'petstore/models/deprecated_object' -require 'petstore/models/dog_all_of' require 'petstore/models/enum_arrays' require 'petstore/models/enum_class' require 'petstore/models/enum_test' diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/cat.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/cat.rb index 60520613679..59cc06ceae5 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/cat.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/cat.rb @@ -45,8 +45,7 @@ module Petstore # List of class defined in allOf (OpenAPI v3) def self.openapi_all_of [ - :'Animal', - :'CatAllOf' + :'Animal' ] end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/cat_all_of.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/cat_all_of.rb deleted file mode 100644 index 5b3371e65e8..00000000000 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/cat_all_of.rb +++ /dev/null @@ -1,219 +0,0 @@ -=begin -#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: \" \\ - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0-SNAPSHOT - -=end - -require 'date' -require 'time' - -module Petstore - class CatAllOf - attr_accessor :declawed - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'declawed' => :'declawed' - } - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'declawed' => :'Boolean' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `Petstore::CatAllOf` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Petstore::CatAllOf`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'declawed') - self.declawed = attributes[:'declawed'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - declawed == o.declawed - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [declawed].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - self.class.openapi_types.each_pair do |key, type| - if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf - klass = Petstore.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - - end - -end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/dog.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/dog.rb index 29172f20ec9..dbfac124513 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/dog.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/dog.rb @@ -45,8 +45,7 @@ module Petstore # List of class defined in allOf (OpenAPI v3) def self.openapi_all_of [ - :'Animal', - :'DogAllOf' + :'Animal' ] end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/dog_all_of.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/dog_all_of.rb deleted file mode 100644 index f6530920972..00000000000 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/dog_all_of.rb +++ /dev/null @@ -1,219 +0,0 @@ -=begin -#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: \" \\ - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0-SNAPSHOT - -=end - -require 'date' -require 'time' - -module Petstore - class DogAllOf - attr_accessor :breed - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'breed' => :'breed' - } - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'breed' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `Petstore::DogAllOf` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Petstore::DogAllOf`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'breed') - self.breed = attributes[:'breed'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - breed == o.breed - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [breed].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - self.class.openapi_types.each_pair do |key, type| - if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf - klass = Petstore.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - - end - -end diff --git a/samples/client/petstore/ruby-faraday/spec/models/all_of_with_single_ref_spec.rb b/samples/client/petstore/ruby-faraday/spec/models/all_of_with_single_ref_spec.rb index 532fe2f6a92..f13ef665f5d 100644 --- a/samples/client/petstore/ruby-faraday/spec/models/all_of_with_single_ref_spec.rb +++ b/samples/client/petstore/ruby-faraday/spec/models/all_of_with_single_ref_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.0-SNAPSHOT +OpenAPI Generator version: 7.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby-faraday/spec/models/cat_all_of_spec.rb b/samples/client/petstore/ruby-faraday/spec/models/cat_all_of_spec.rb deleted file mode 100644 index 9530b974cbd..00000000000 --- a/samples/client/petstore/ruby-faraday/spec/models/cat_all_of_spec.rb +++ /dev/null @@ -1,41 +0,0 @@ -=begin -#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: \" \\ - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0-SNAPSHOT - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for Petstore::CatAllOf -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe 'CatAllOf' do - before do - # run before each test - @instance = Petstore::CatAllOf.new - end - - after do - # run after each test - end - - describe 'test an instance of CatAllOf' do - it 'should create an instance of CatAllOf' do - expect(@instance).to be_instance_of(Petstore::CatAllOf) - end - end - describe 'test attribute "declawed"' do - it 'should work' do - # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ - end - end - -end diff --git a/samples/client/petstore/ruby-faraday/spec/models/dog_all_of_spec.rb b/samples/client/petstore/ruby-faraday/spec/models/dog_all_of_spec.rb deleted file mode 100644 index fe263db11c0..00000000000 --- a/samples/client/petstore/ruby-faraday/spec/models/dog_all_of_spec.rb +++ /dev/null @@ -1,41 +0,0 @@ -=begin -#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: \" \\ - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0-SNAPSHOT - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for Petstore::DogAllOf -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe 'DogAllOf' do - before do - # run before each test - @instance = Petstore::DogAllOf.new - end - - after do - # run after each test - end - - describe 'test an instance of DogAllOf' do - it 'should create an instance of DogAllOf' do - expect(@instance).to be_instance_of(Petstore::DogAllOf) - end - end - describe 'test attribute "breed"' do - it 'should work' do - # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ - end - end - -end diff --git a/samples/client/petstore/ruby/.openapi-generator/FILES b/samples/client/petstore/ruby/.openapi-generator/FILES index ee516e123ab..ed16a1e03d1 100644 --- a/samples/client/petstore/ruby/.openapi-generator/FILES +++ b/samples/client/petstore/ruby/.openapi-generator/FILES @@ -16,14 +16,12 @@ docs/ArrayOfNumberOnly.md docs/ArrayTest.md docs/Capitalization.md docs/Cat.md -docs/CatAllOf.md docs/Category.md docs/ClassModel.md docs/Client.md docs/DefaultApi.md docs/DeprecatedObject.md docs/Dog.md -docs/DogAllOf.md docs/EnumArrays.md docs/EnumClass.md docs/EnumTest.md @@ -83,13 +81,11 @@ lib/petstore/models/array_of_number_only.rb lib/petstore/models/array_test.rb lib/petstore/models/capitalization.rb lib/petstore/models/cat.rb -lib/petstore/models/cat_all_of.rb lib/petstore/models/category.rb lib/petstore/models/class_model.rb lib/petstore/models/client.rb lib/petstore/models/deprecated_object.rb lib/petstore/models/dog.rb -lib/petstore/models/dog_all_of.rb lib/petstore/models/enum_arrays.rb lib/petstore/models/enum_class.rb lib/petstore/models/enum_test.rb diff --git a/samples/client/petstore/ruby/README.md b/samples/client/petstore/ruby/README.md index 449dc151820..24656471c4b 100644 --- a/samples/client/petstore/ruby/README.md +++ b/samples/client/petstore/ruby/README.md @@ -130,13 +130,11 @@ Class | Method | HTTP request | Description - [Petstore::ArrayTest](docs/ArrayTest.md) - [Petstore::Capitalization](docs/Capitalization.md) - [Petstore::Cat](docs/Cat.md) - - [Petstore::CatAllOf](docs/CatAllOf.md) - [Petstore::Category](docs/Category.md) - [Petstore::ClassModel](docs/ClassModel.md) - [Petstore::Client](docs/Client.md) - [Petstore::DeprecatedObject](docs/DeprecatedObject.md) - [Petstore::Dog](docs/Dog.md) - - [Petstore::DogAllOf](docs/DogAllOf.md) - [Petstore::EnumArrays](docs/EnumArrays.md) - [Petstore::EnumClass](docs/EnumClass.md) - [Petstore::EnumTest](docs/EnumTest.md) diff --git a/samples/client/petstore/ruby/docs/CatAllOf.md b/samples/client/petstore/ruby/docs/CatAllOf.md deleted file mode 100644 index 8d91ec5d6eb..00000000000 --- a/samples/client/petstore/ruby/docs/CatAllOf.md +++ /dev/null @@ -1,18 +0,0 @@ -# Petstore::CatAllOf - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **declawed** | **Boolean** | | [optional] | - -## Example - -```ruby -require 'petstore' - -instance = Petstore::CatAllOf.new( - declawed: null -) -``` - diff --git a/samples/client/petstore/ruby/docs/DogAllOf.md b/samples/client/petstore/ruby/docs/DogAllOf.md deleted file mode 100644 index e0e7a831d0e..00000000000 --- a/samples/client/petstore/ruby/docs/DogAllOf.md +++ /dev/null @@ -1,18 +0,0 @@ -# Petstore::DogAllOf - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **breed** | **String** | | [optional] | - -## Example - -```ruby -require 'petstore' - -instance = Petstore::DogAllOf.new( - breed: null -) -``` - diff --git a/samples/client/petstore/ruby/lib/petstore.rb b/samples/client/petstore/ruby/lib/petstore.rb index 5f63374527e..551107cffb7 100644 --- a/samples/client/petstore/ruby/lib/petstore.rb +++ b/samples/client/petstore/ruby/lib/petstore.rb @@ -25,12 +25,10 @@ require 'petstore/models/array_of_array_of_number_only' require 'petstore/models/array_of_number_only' require 'petstore/models/array_test' require 'petstore/models/capitalization' -require 'petstore/models/cat_all_of' require 'petstore/models/category' require 'petstore/models/class_model' require 'petstore/models/client' require 'petstore/models/deprecated_object' -require 'petstore/models/dog_all_of' require 'petstore/models/enum_arrays' require 'petstore/models/enum_class' require 'petstore/models/enum_test' diff --git a/samples/client/petstore/ruby/lib/petstore/models/cat.rb b/samples/client/petstore/ruby/lib/petstore/models/cat.rb index 60520613679..59cc06ceae5 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/cat.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/cat.rb @@ -45,8 +45,7 @@ module Petstore # List of class defined in allOf (OpenAPI v3) def self.openapi_all_of [ - :'Animal', - :'CatAllOf' + :'Animal' ] end diff --git a/samples/client/petstore/ruby/lib/petstore/models/cat_all_of.rb b/samples/client/petstore/ruby/lib/petstore/models/cat_all_of.rb deleted file mode 100644 index 5b3371e65e8..00000000000 --- a/samples/client/petstore/ruby/lib/petstore/models/cat_all_of.rb +++ /dev/null @@ -1,219 +0,0 @@ -=begin -#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: \" \\ - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0-SNAPSHOT - -=end - -require 'date' -require 'time' - -module Petstore - class CatAllOf - attr_accessor :declawed - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'declawed' => :'declawed' - } - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'declawed' => :'Boolean' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `Petstore::CatAllOf` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Petstore::CatAllOf`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'declawed') - self.declawed = attributes[:'declawed'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - declawed == o.declawed - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [declawed].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - self.class.openapi_types.each_pair do |key, type| - if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf - klass = Petstore.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - - end - -end diff --git a/samples/client/petstore/ruby/lib/petstore/models/dog.rb b/samples/client/petstore/ruby/lib/petstore/models/dog.rb index 29172f20ec9..dbfac124513 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/dog.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/dog.rb @@ -45,8 +45,7 @@ module Petstore # List of class defined in allOf (OpenAPI v3) def self.openapi_all_of [ - :'Animal', - :'DogAllOf' + :'Animal' ] end diff --git a/samples/client/petstore/ruby/lib/petstore/models/dog_all_of.rb b/samples/client/petstore/ruby/lib/petstore/models/dog_all_of.rb deleted file mode 100644 index f6530920972..00000000000 --- a/samples/client/petstore/ruby/lib/petstore/models/dog_all_of.rb +++ /dev/null @@ -1,219 +0,0 @@ -=begin -#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: \" \\ - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0-SNAPSHOT - -=end - -require 'date' -require 'time' - -module Petstore - class DogAllOf - attr_accessor :breed - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'breed' => :'breed' - } - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'breed' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `Petstore::DogAllOf` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Petstore::DogAllOf`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'breed') - self.breed = attributes[:'breed'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - breed == o.breed - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [breed].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - self.class.openapi_types.each_pair do |key, type| - if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf - klass = Petstore.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - - end - -end diff --git a/samples/client/petstore/ruby/spec/models/all_of_with_single_ref_spec.rb b/samples/client/petstore/ruby/spec/models/all_of_with_single_ref_spec.rb index 532fe2f6a92..f13ef665f5d 100644 --- a/samples/client/petstore/ruby/spec/models/all_of_with_single_ref_spec.rb +++ b/samples/client/petstore/ruby/spec/models/all_of_with_single_ref_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 6.0.0-SNAPSHOT +OpenAPI Generator version: 7.0.0-SNAPSHOT =end diff --git a/samples/client/petstore/ruby/spec/models/cat_all_of_spec.rb b/samples/client/petstore/ruby/spec/models/cat_all_of_spec.rb deleted file mode 100644 index 9530b974cbd..00000000000 --- a/samples/client/petstore/ruby/spec/models/cat_all_of_spec.rb +++ /dev/null @@ -1,41 +0,0 @@ -=begin -#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: \" \\ - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0-SNAPSHOT - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for Petstore::CatAllOf -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe 'CatAllOf' do - before do - # run before each test - @instance = Petstore::CatAllOf.new - end - - after do - # run after each test - end - - describe 'test an instance of CatAllOf' do - it 'should create an instance of CatAllOf' do - expect(@instance).to be_instance_of(Petstore::CatAllOf) - end - end - describe 'test attribute "declawed"' do - it 'should work' do - # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ - end - end - -end diff --git a/samples/client/petstore/ruby/spec/models/dog_all_of_spec.rb b/samples/client/petstore/ruby/spec/models/dog_all_of_spec.rb deleted file mode 100644 index fe263db11c0..00000000000 --- a/samples/client/petstore/ruby/spec/models/dog_all_of_spec.rb +++ /dev/null @@ -1,41 +0,0 @@ -=begin -#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: \" \\ - -The version of the OpenAPI document: 1.0.0 - -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.0.0-SNAPSHOT - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for Petstore::DogAllOf -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe 'DogAllOf' do - before do - # run before each test - @instance = Petstore::DogAllOf.new - end - - after do - # run after each test - end - - describe 'test an instance of DogAllOf' do - it 'should create an instance of DogAllOf' do - expect(@instance).to be_instance_of(Petstore::DogAllOf) - end - end - describe 'test attribute "breed"' do - it 'should work' do - # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ - end - end - -end diff --git a/samples/client/petstore/spring-http-interface-reactive/.openapi-generator/FILES b/samples/client/petstore/spring-http-interface-reactive/.openapi-generator/FILES index 4507343d0db..bf0cf4464f9 100644 --- a/samples/client/petstore/spring-http-interface-reactive/.openapi-generator/FILES +++ b/samples/client/petstore/spring-http-interface-reactive/.openapi-generator/FILES @@ -20,16 +20,13 @@ src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java src/main/java/org/openapitools/model/ArrayOfNumberOnly.java src/main/java/org/openapitools/model/ArrayTest.java src/main/java/org/openapitools/model/BigCat.java -src/main/java/org/openapitools/model/BigCatAllOf.java src/main/java/org/openapitools/model/Capitalization.java src/main/java/org/openapitools/model/Cat.java -src/main/java/org/openapitools/model/CatAllOf.java src/main/java/org/openapitools/model/Category.java src/main/java/org/openapitools/model/ClassModel.java src/main/java/org/openapitools/model/Client.java src/main/java/org/openapitools/model/ContainerDefaultValue.java src/main/java/org/openapitools/model/Dog.java -src/main/java/org/openapitools/model/DogAllOf.java src/main/java/org/openapitools/model/EnumArrays.java src/main/java/org/openapitools/model/EnumClass.java src/main/java/org/openapitools/model/EnumTest.java diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/BigCatAllOf.java deleted file mode 100644 index 017c44034ae..00000000000 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/BigCatAllOf.java +++ /dev/null @@ -1,122 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; - - -import java.util.*; -import jakarta.annotation.Generated; - -/** - * BigCatAllOf - */ - -@JsonTypeName("BigCat_allOf") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class BigCatAllOf { - - /** - * Gets or Sets kind - */ - public enum KindEnum { - LIONS("lions"), - - TIGERS("tigers"), - - LEOPARDS("leopards"), - - JAGUARS("jaguars"); - - private String value; - - KindEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static KindEnum fromValue(String value) { - for (KindEnum b : KindEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - private KindEnum kind; - - public BigCatAllOf kind(KindEnum kind) { - this.kind = kind; - return this; - } - - /** - * Get kind - * @return kind - */ - - @JsonProperty("kind") - public KindEnum getKind() { - return kind; - } - - public void setKind(KindEnum kind) { - this.kind = kind; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BigCatAllOf bigCatAllOf = (BigCatAllOf) o; - return Objects.equals(this.kind, bigCatAllOf.kind); - } - - @Override - public int hashCode() { - return Objects.hash(kind); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BigCatAllOf {\n"); - sb.append(" kind: ").append(toIndentedString(kind)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/CatAllOf.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/CatAllOf.java deleted file mode 100644 index 2ea1a62e728..00000000000 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/CatAllOf.java +++ /dev/null @@ -1,82 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; - - -import java.util.*; -import jakarta.annotation.Generated; - -/** - * CatAllOf - */ - -@JsonTypeName("Cat_allOf") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class CatAllOf { - - private Boolean declawed; - - public CatAllOf declawed(Boolean declawed) { - this.declawed = declawed; - return this; - } - - /** - * Get declawed - * @return declawed - */ - - @JsonProperty("declawed") - public Boolean getDeclawed() { - return declawed; - } - - public void setDeclawed(Boolean declawed) { - this.declawed = declawed; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CatAllOf catAllOf = (CatAllOf) o; - return Objects.equals(this.declawed, catAllOf.declawed); - } - - @Override - public int hashCode() { - return Objects.hash(declawed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CatAllOf {\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/DogAllOf.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/DogAllOf.java deleted file mode 100644 index e95125f5988..00000000000 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/DogAllOf.java +++ /dev/null @@ -1,82 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import jakarta.validation.constraints.NotNull; - - -import java.util.*; -import jakarta.annotation.Generated; - -/** - * DogAllOf - */ - -@JsonTypeName("Dog_allOf") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class DogAllOf { - - private String breed; - - public DogAllOf breed(String breed) { - this.breed = breed; - return this; - } - - /** - * Get breed - * @return breed - */ - - @JsonProperty("breed") - public String getBreed() { - return breed; - } - - public void setBreed(String breed) { - this.breed = breed; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DogAllOf dogAllOf = (DogAllOf) o; - return Objects.equals(this.breed, dogAllOf.breed); - } - - @Override - public int hashCode() { - return Objects.hash(breed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DogAllOf {\n"); - sb.append(" breed: ").append(toIndentedString(breed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/client/petstore/spring-http-interface/.openapi-generator/FILES b/samples/client/petstore/spring-http-interface/.openapi-generator/FILES index 12b7506e673..d06abb86e88 100644 --- a/samples/client/petstore/spring-http-interface/.openapi-generator/FILES +++ b/samples/client/petstore/spring-http-interface/.openapi-generator/FILES @@ -20,16 +20,13 @@ src/main/java/org/openapitools/model/ApiResponseDto.java src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnlyDto.java src/main/java/org/openapitools/model/ArrayOfNumberOnlyDto.java src/main/java/org/openapitools/model/ArrayTestDto.java -src/main/java/org/openapitools/model/BigCatAllOfDto.java src/main/java/org/openapitools/model/BigCatDto.java src/main/java/org/openapitools/model/CapitalizationDto.java -src/main/java/org/openapitools/model/CatAllOfDto.java src/main/java/org/openapitools/model/CatDto.java src/main/java/org/openapitools/model/CategoryDto.java src/main/java/org/openapitools/model/ClassModelDto.java src/main/java/org/openapitools/model/ClientDto.java src/main/java/org/openapitools/model/ContainerDefaultValueDto.java -src/main/java/org/openapitools/model/DogAllOfDto.java src/main/java/org/openapitools/model/DogDto.java src/main/java/org/openapitools/model/EnumArraysDto.java src/main/java/org/openapitools/model/EnumClassDto.java diff --git a/samples/client/petstore/swift5/alamofireLibrary/.openapi-generator/FILES b/samples/client/petstore/swift5/alamofireLibrary/.openapi-generator/FILES index ee10936dd64..77f1f46f61c 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/.openapi-generator/FILES +++ b/samples/client/petstore/swift5/alamofireLibrary/.openapi-generator/FILES @@ -27,12 +27,10 @@ PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift PetstoreClient/Classes/OpenAPIs/Models/Cat.swift -PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift PetstoreClient/Classes/OpenAPIs/Models/Category.swift PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift PetstoreClient/Classes/OpenAPIs/Models/Client.swift PetstoreClient/Classes/OpenAPIs/Models/Dog.swift -PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift @@ -73,12 +71,10 @@ docs/ArrayOfNumberOnly.md docs/ArrayTest.md docs/Capitalization.md docs/Cat.md -docs/CatAllOf.md docs/Category.md docs/ClassModel.md docs/Client.md docs/Dog.md -docs/DogAllOf.md docs/EnumArrays.md docs/EnumClass.md docs/EnumTest.md diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift deleted file mode 100644 index 681bcada15f..00000000000 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift +++ /dev/null @@ -1,32 +0,0 @@ -// -// CatAllOf.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct CatAllOf: Codable, JSONEncodable, Hashable { - - public var declawed: Bool? - - public init(declawed: Bool? = nil) { - self.declawed = declawed - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case declawed - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(declawed, forKey: .declawed) - } -} - diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift deleted file mode 100644 index 627bb997c5e..00000000000 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift +++ /dev/null @@ -1,32 +0,0 @@ -// -// DogAllOf.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct DogAllOf: Codable, JSONEncodable, Hashable { - - public var breed: String? - - public init(breed: String? = nil) { - self.breed = breed - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case breed - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(breed, forKey: .breed) - } -} - diff --git a/samples/client/petstore/swift5/alamofireLibrary/README.md b/samples/client/petstore/swift5/alamofireLibrary/README.md index 4b99306b38f..699154010d9 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/README.md +++ b/samples/client/petstore/swift5/alamofireLibrary/README.md @@ -73,12 +73,10 @@ Class | Method | HTTP request | Description - [ArrayTest](docs/ArrayTest.md) - [Capitalization](docs/Capitalization.md) - [Cat](docs/Cat.md) - - [CatAllOf](docs/CatAllOf.md) - [Category](docs/Category.md) - [ClassModel](docs/ClassModel.md) - [Client](docs/Client.md) - [Dog](docs/Dog.md) - - [DogAllOf](docs/DogAllOf.md) - [EnumArrays](docs/EnumArrays.md) - [EnumClass](docs/EnumClass.md) - [EnumTest](docs/EnumTest.md) diff --git a/samples/client/petstore/swift5/alamofireLibrary/docs/CatAllOf.md b/samples/client/petstore/swift5/alamofireLibrary/docs/CatAllOf.md deleted file mode 100644 index 79789be61c0..00000000000 --- a/samples/client/petstore/swift5/alamofireLibrary/docs/CatAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# CatAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**declawed** | **Bool** | | [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/swift5/alamofireLibrary/docs/DogAllOf.md b/samples/client/petstore/swift5/alamofireLibrary/docs/DogAllOf.md deleted file mode 100644 index 9302ef52e93..00000000000 --- a/samples/client/petstore/swift5/alamofireLibrary/docs/DogAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# DogAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**breed** | **String** | | [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/swift5/asyncAwaitLibrary/.openapi-generator/FILES b/samples/client/petstore/swift5/asyncAwaitLibrary/.openapi-generator/FILES index 3c712e3da52..2d7a6950406 100644 --- a/samples/client/petstore/swift5/asyncAwaitLibrary/.openapi-generator/FILES +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/.openapi-generator/FILES @@ -26,12 +26,10 @@ PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift PetstoreClient/Classes/OpenAPIs/Models/Cat.swift -PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift PetstoreClient/Classes/OpenAPIs/Models/Category.swift PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift PetstoreClient/Classes/OpenAPIs/Models/Client.swift PetstoreClient/Classes/OpenAPIs/Models/Dog.swift -PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift @@ -72,12 +70,10 @@ docs/ArrayOfNumberOnly.md docs/ArrayTest.md docs/Capitalization.md docs/Cat.md -docs/CatAllOf.md docs/Category.md docs/ClassModel.md docs/Client.md docs/Dog.md -docs/DogAllOf.md docs/EnumArrays.md docs/EnumClass.md docs/EnumTest.md diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift deleted file mode 100644 index 681bcada15f..00000000000 --- a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift +++ /dev/null @@ -1,32 +0,0 @@ -// -// CatAllOf.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct CatAllOf: Codable, JSONEncodable, Hashable { - - public var declawed: Bool? - - public init(declawed: Bool? = nil) { - self.declawed = declawed - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case declawed - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(declawed, forKey: .declawed) - } -} - diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift deleted file mode 100644 index 627bb997c5e..00000000000 --- a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift +++ /dev/null @@ -1,32 +0,0 @@ -// -// DogAllOf.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct DogAllOf: Codable, JSONEncodable, Hashable { - - public var breed: String? - - public init(breed: String? = nil) { - self.breed = breed - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case breed - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(breed, forKey: .breed) - } -} - diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/README.md b/samples/client/petstore/swift5/asyncAwaitLibrary/README.md index 4b99306b38f..699154010d9 100644 --- a/samples/client/petstore/swift5/asyncAwaitLibrary/README.md +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/README.md @@ -73,12 +73,10 @@ Class | Method | HTTP request | Description - [ArrayTest](docs/ArrayTest.md) - [Capitalization](docs/Capitalization.md) - [Cat](docs/Cat.md) - - [CatAllOf](docs/CatAllOf.md) - [Category](docs/Category.md) - [ClassModel](docs/ClassModel.md) - [Client](docs/Client.md) - [Dog](docs/Dog.md) - - [DogAllOf](docs/DogAllOf.md) - [EnumArrays](docs/EnumArrays.md) - [EnumClass](docs/EnumClass.md) - [EnumTest](docs/EnumTest.md) diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/docs/CatAllOf.md b/samples/client/petstore/swift5/asyncAwaitLibrary/docs/CatAllOf.md deleted file mode 100644 index 79789be61c0..00000000000 --- a/samples/client/petstore/swift5/asyncAwaitLibrary/docs/CatAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# CatAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**declawed** | **Bool** | | [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/swift5/asyncAwaitLibrary/docs/DogAllOf.md b/samples/client/petstore/swift5/asyncAwaitLibrary/docs/DogAllOf.md deleted file mode 100644 index 9302ef52e93..00000000000 --- a/samples/client/petstore/swift5/asyncAwaitLibrary/docs/DogAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# DogAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**breed** | **String** | | [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/swift5/combineLibrary/.openapi-generator/FILES b/samples/client/petstore/swift5/combineLibrary/.openapi-generator/FILES index 3c712e3da52..2d7a6950406 100644 --- a/samples/client/petstore/swift5/combineLibrary/.openapi-generator/FILES +++ b/samples/client/petstore/swift5/combineLibrary/.openapi-generator/FILES @@ -26,12 +26,10 @@ PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift PetstoreClient/Classes/OpenAPIs/Models/Cat.swift -PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift PetstoreClient/Classes/OpenAPIs/Models/Category.swift PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift PetstoreClient/Classes/OpenAPIs/Models/Client.swift PetstoreClient/Classes/OpenAPIs/Models/Dog.swift -PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift @@ -72,12 +70,10 @@ docs/ArrayOfNumberOnly.md docs/ArrayTest.md docs/Capitalization.md docs/Cat.md -docs/CatAllOf.md docs/Category.md docs/ClassModel.md docs/Client.md docs/Dog.md -docs/DogAllOf.md docs/EnumArrays.md docs/EnumClass.md docs/EnumTest.md diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift deleted file mode 100644 index 681bcada15f..00000000000 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift +++ /dev/null @@ -1,32 +0,0 @@ -// -// CatAllOf.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct CatAllOf: Codable, JSONEncodable, Hashable { - - public var declawed: Bool? - - public init(declawed: Bool? = nil) { - self.declawed = declawed - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case declawed - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(declawed, forKey: .declawed) - } -} - diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift deleted file mode 100644 index 627bb997c5e..00000000000 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift +++ /dev/null @@ -1,32 +0,0 @@ -// -// DogAllOf.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct DogAllOf: Codable, JSONEncodable, Hashable { - - public var breed: String? - - public init(breed: String? = nil) { - self.breed = breed - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case breed - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(breed, forKey: .breed) - } -} - diff --git a/samples/client/petstore/swift5/combineLibrary/README.md b/samples/client/petstore/swift5/combineLibrary/README.md index 4b99306b38f..699154010d9 100644 --- a/samples/client/petstore/swift5/combineLibrary/README.md +++ b/samples/client/petstore/swift5/combineLibrary/README.md @@ -73,12 +73,10 @@ Class | Method | HTTP request | Description - [ArrayTest](docs/ArrayTest.md) - [Capitalization](docs/Capitalization.md) - [Cat](docs/Cat.md) - - [CatAllOf](docs/CatAllOf.md) - [Category](docs/Category.md) - [ClassModel](docs/ClassModel.md) - [Client](docs/Client.md) - [Dog](docs/Dog.md) - - [DogAllOf](docs/DogAllOf.md) - [EnumArrays](docs/EnumArrays.md) - [EnumClass](docs/EnumClass.md) - [EnumTest](docs/EnumTest.md) diff --git a/samples/client/petstore/swift5/combineLibrary/docs/CatAllOf.md b/samples/client/petstore/swift5/combineLibrary/docs/CatAllOf.md deleted file mode 100644 index 79789be61c0..00000000000 --- a/samples/client/petstore/swift5/combineLibrary/docs/CatAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# CatAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**declawed** | **Bool** | | [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/swift5/combineLibrary/docs/DogAllOf.md b/samples/client/petstore/swift5/combineLibrary/docs/DogAllOf.md deleted file mode 100644 index 9302ef52e93..00000000000 --- a/samples/client/petstore/swift5/combineLibrary/docs/DogAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# DogAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**breed** | **String** | | [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/swift5/default/.openapi-generator/FILES b/samples/client/petstore/swift5/default/.openapi-generator/FILES index dd19a56390b..a28346adb38 100644 --- a/samples/client/petstore/swift5/default/.openapi-generator/FILES +++ b/samples/client/petstore/swift5/default/.openapi-generator/FILES @@ -32,15 +32,12 @@ PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift PetstoreClient/Classes/OpenAPIs/Models/BigCat.swift -PetstoreClient/Classes/OpenAPIs/Models/BigCatAllOf.swift PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift PetstoreClient/Classes/OpenAPIs/Models/Cat.swift -PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift PetstoreClient/Classes/OpenAPIs/Models/Category.swift PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift PetstoreClient/Classes/OpenAPIs/Models/Client.swift PetstoreClient/Classes/OpenAPIs/Models/Dog.swift -PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift @@ -88,15 +85,12 @@ docs/ArrayOfArrayOfNumberOnly.md docs/ArrayOfNumberOnly.md docs/ArrayTest.md docs/BigCat.md -docs/BigCatAllOf.md docs/Capitalization.md docs/Cat.md -docs/CatAllOf.md docs/Category.md docs/ClassModel.md docs/Client.md docs/Dog.md -docs/DogAllOf.md docs/EnumArrays.md docs/EnumClass.md docs/EnumTest.md diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/BigCatAllOf.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/BigCatAllOf.swift deleted file mode 100644 index 24dcc39dfe2..00000000000 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/BigCatAllOf.swift +++ /dev/null @@ -1,38 +0,0 @@ -// -// BigCatAllOf.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct BigCatAllOf: Codable, JSONEncodable, Hashable { - - public enum Kind: String, Codable, CaseIterable { - case lions = "lions" - case tigers = "tigers" - case leopards = "leopards" - case jaguars = "jaguars" - } - public var kind: Kind? - - public init(kind: Kind? = nil) { - self.kind = kind - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case kind - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(kind, forKey: .kind) - } -} - diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift deleted file mode 100644 index 681bcada15f..00000000000 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift +++ /dev/null @@ -1,32 +0,0 @@ -// -// CatAllOf.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct CatAllOf: Codable, JSONEncodable, Hashable { - - public var declawed: Bool? - - public init(declawed: Bool? = nil) { - self.declawed = declawed - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case declawed - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(declawed, forKey: .declawed) - } -} - diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift deleted file mode 100644 index 627bb997c5e..00000000000 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift +++ /dev/null @@ -1,32 +0,0 @@ -// -// DogAllOf.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct DogAllOf: Codable, JSONEncodable, Hashable { - - public var breed: String? - - public init(breed: String? = nil) { - self.breed = breed - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case breed - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(breed, forKey: .breed) - } -} - diff --git a/samples/client/petstore/swift5/default/README.md b/samples/client/petstore/swift5/default/README.md index c74e8f9a373..a2308a24457 100644 --- a/samples/client/petstore/swift5/default/README.md +++ b/samples/client/petstore/swift5/default/README.md @@ -81,15 +81,12 @@ Class | Method | HTTP request | Description - [ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md) - [ArrayTest](docs/ArrayTest.md) - [BigCat](docs/BigCat.md) - - [BigCatAllOf](docs/BigCatAllOf.md) - [Capitalization](docs/Capitalization.md) - [Cat](docs/Cat.md) - - [CatAllOf](docs/CatAllOf.md) - [Category](docs/Category.md) - [ClassModel](docs/ClassModel.md) - [Client](docs/Client.md) - [Dog](docs/Dog.md) - - [DogAllOf](docs/DogAllOf.md) - [EnumArrays](docs/EnumArrays.md) - [EnumClass](docs/EnumClass.md) - [EnumTest](docs/EnumTest.md) diff --git a/samples/client/petstore/swift5/default/docs/BigCatAllOf.md b/samples/client/petstore/swift5/default/docs/BigCatAllOf.md deleted file mode 100644 index 20da4caf5d0..00000000000 --- a/samples/client/petstore/swift5/default/docs/BigCatAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# BigCatAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**kind** | **String** | | [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/swift5/default/docs/CatAllOf.md b/samples/client/petstore/swift5/default/docs/CatAllOf.md deleted file mode 100644 index 79789be61c0..00000000000 --- a/samples/client/petstore/swift5/default/docs/CatAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# CatAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**declawed** | **Bool** | | [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/swift5/default/docs/DogAllOf.md b/samples/client/petstore/swift5/default/docs/DogAllOf.md deleted file mode 100644 index 9302ef52e93..00000000000 --- a/samples/client/petstore/swift5/default/docs/DogAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# DogAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**breed** | **String** | | [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/swift5/frozenEnums/.openapi-generator/FILES b/samples/client/petstore/swift5/frozenEnums/.openapi-generator/FILES index 3c712e3da52..2d7a6950406 100644 --- a/samples/client/petstore/swift5/frozenEnums/.openapi-generator/FILES +++ b/samples/client/petstore/swift5/frozenEnums/.openapi-generator/FILES @@ -26,12 +26,10 @@ PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift PetstoreClient/Classes/OpenAPIs/Models/Cat.swift -PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift PetstoreClient/Classes/OpenAPIs/Models/Category.swift PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift PetstoreClient/Classes/OpenAPIs/Models/Client.swift PetstoreClient/Classes/OpenAPIs/Models/Dog.swift -PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift @@ -72,12 +70,10 @@ docs/ArrayOfNumberOnly.md docs/ArrayTest.md docs/Capitalization.md docs/Cat.md -docs/CatAllOf.md docs/Category.md docs/ClassModel.md docs/Client.md docs/Dog.md -docs/DogAllOf.md docs/EnumArrays.md docs/EnumClass.md docs/EnumTest.md diff --git a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift deleted file mode 100644 index 681bcada15f..00000000000 --- a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift +++ /dev/null @@ -1,32 +0,0 @@ -// -// CatAllOf.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct CatAllOf: Codable, JSONEncodable, Hashable { - - public var declawed: Bool? - - public init(declawed: Bool? = nil) { - self.declawed = declawed - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case declawed - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(declawed, forKey: .declawed) - } -} - diff --git a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift deleted file mode 100644 index 627bb997c5e..00000000000 --- a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift +++ /dev/null @@ -1,32 +0,0 @@ -// -// DogAllOf.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct DogAllOf: Codable, JSONEncodable, Hashable { - - public var breed: String? - - public init(breed: String? = nil) { - self.breed = breed - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case breed - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(breed, forKey: .breed) - } -} - diff --git a/samples/client/petstore/swift5/frozenEnums/README.md b/samples/client/petstore/swift5/frozenEnums/README.md index 4b99306b38f..699154010d9 100644 --- a/samples/client/petstore/swift5/frozenEnums/README.md +++ b/samples/client/petstore/swift5/frozenEnums/README.md @@ -73,12 +73,10 @@ Class | Method | HTTP request | Description - [ArrayTest](docs/ArrayTest.md) - [Capitalization](docs/Capitalization.md) - [Cat](docs/Cat.md) - - [CatAllOf](docs/CatAllOf.md) - [Category](docs/Category.md) - [ClassModel](docs/ClassModel.md) - [Client](docs/Client.md) - [Dog](docs/Dog.md) - - [DogAllOf](docs/DogAllOf.md) - [EnumArrays](docs/EnumArrays.md) - [EnumClass](docs/EnumClass.md) - [EnumTest](docs/EnumTest.md) diff --git a/samples/client/petstore/swift5/frozenEnums/docs/CatAllOf.md b/samples/client/petstore/swift5/frozenEnums/docs/CatAllOf.md deleted file mode 100644 index 79789be61c0..00000000000 --- a/samples/client/petstore/swift5/frozenEnums/docs/CatAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# CatAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**declawed** | **Bool** | | [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/swift5/frozenEnums/docs/DogAllOf.md b/samples/client/petstore/swift5/frozenEnums/docs/DogAllOf.md deleted file mode 100644 index 9302ef52e93..00000000000 --- a/samples/client/petstore/swift5/frozenEnums/docs/DogAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# DogAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**breed** | **String** | | [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/swift5/nonPublicApi/.openapi-generator/FILES b/samples/client/petstore/swift5/nonPublicApi/.openapi-generator/FILES index 3c712e3da52..2d7a6950406 100644 --- a/samples/client/petstore/swift5/nonPublicApi/.openapi-generator/FILES +++ b/samples/client/petstore/swift5/nonPublicApi/.openapi-generator/FILES @@ -26,12 +26,10 @@ PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift PetstoreClient/Classes/OpenAPIs/Models/Cat.swift -PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift PetstoreClient/Classes/OpenAPIs/Models/Category.swift PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift PetstoreClient/Classes/OpenAPIs/Models/Client.swift PetstoreClient/Classes/OpenAPIs/Models/Dog.swift -PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift @@ -72,12 +70,10 @@ docs/ArrayOfNumberOnly.md docs/ArrayTest.md docs/Capitalization.md docs/Cat.md -docs/CatAllOf.md docs/Category.md docs/ClassModel.md docs/Client.md docs/Dog.md -docs/DogAllOf.md docs/EnumArrays.md docs/EnumClass.md docs/EnumTest.md diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift deleted file mode 100644 index 9c7e6d829f2..00000000000 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift +++ /dev/null @@ -1,32 +0,0 @@ -// -// CatAllOf.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -internal struct CatAllOf: Codable, JSONEncodable, Hashable { - - internal var declawed: Bool? - - internal init(declawed: Bool? = nil) { - self.declawed = declawed - } - - internal enum CodingKeys: String, CodingKey, CaseIterable { - case declawed - } - - // Encodable protocol methods - - internal func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(declawed, forKey: .declawed) - } -} - diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift deleted file mode 100644 index ace1ac3eab4..00000000000 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift +++ /dev/null @@ -1,32 +0,0 @@ -// -// DogAllOf.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -internal struct DogAllOf: Codable, JSONEncodable, Hashable { - - internal var breed: String? - - internal init(breed: String? = nil) { - self.breed = breed - } - - internal enum CodingKeys: String, CodingKey, CaseIterable { - case breed - } - - // Encodable protocol methods - - internal func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(breed, forKey: .breed) - } -} - diff --git a/samples/client/petstore/swift5/nonPublicApi/README.md b/samples/client/petstore/swift5/nonPublicApi/README.md index 4b99306b38f..699154010d9 100644 --- a/samples/client/petstore/swift5/nonPublicApi/README.md +++ b/samples/client/petstore/swift5/nonPublicApi/README.md @@ -73,12 +73,10 @@ Class | Method | HTTP request | Description - [ArrayTest](docs/ArrayTest.md) - [Capitalization](docs/Capitalization.md) - [Cat](docs/Cat.md) - - [CatAllOf](docs/CatAllOf.md) - [Category](docs/Category.md) - [ClassModel](docs/ClassModel.md) - [Client](docs/Client.md) - [Dog](docs/Dog.md) - - [DogAllOf](docs/DogAllOf.md) - [EnumArrays](docs/EnumArrays.md) - [EnumClass](docs/EnumClass.md) - [EnumTest](docs/EnumTest.md) diff --git a/samples/client/petstore/swift5/nonPublicApi/docs/CatAllOf.md b/samples/client/petstore/swift5/nonPublicApi/docs/CatAllOf.md deleted file mode 100644 index 79789be61c0..00000000000 --- a/samples/client/petstore/swift5/nonPublicApi/docs/CatAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# CatAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**declawed** | **Bool** | | [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/swift5/nonPublicApi/docs/DogAllOf.md b/samples/client/petstore/swift5/nonPublicApi/docs/DogAllOf.md deleted file mode 100644 index 9302ef52e93..00000000000 --- a/samples/client/petstore/swift5/nonPublicApi/docs/DogAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# DogAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**breed** | **String** | | [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/swift5/objcCompatible/.openapi-generator/FILES b/samples/client/petstore/swift5/objcCompatible/.openapi-generator/FILES index 3c712e3da52..2d7a6950406 100644 --- a/samples/client/petstore/swift5/objcCompatible/.openapi-generator/FILES +++ b/samples/client/petstore/swift5/objcCompatible/.openapi-generator/FILES @@ -26,12 +26,10 @@ PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift PetstoreClient/Classes/OpenAPIs/Models/Cat.swift -PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift PetstoreClient/Classes/OpenAPIs/Models/Category.swift PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift PetstoreClient/Classes/OpenAPIs/Models/Client.swift PetstoreClient/Classes/OpenAPIs/Models/Dog.swift -PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift @@ -72,12 +70,10 @@ docs/ArrayOfNumberOnly.md docs/ArrayTest.md docs/Capitalization.md docs/Cat.md -docs/CatAllOf.md docs/Category.md docs/ClassModel.md docs/Client.md docs/Dog.md -docs/DogAllOf.md docs/EnumArrays.md docs/EnumClass.md docs/EnumTest.md diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift deleted file mode 100644 index cd72b8663f2..00000000000 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift +++ /dev/null @@ -1,37 +0,0 @@ -// -// CatAllOf.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -@objcMembers public class CatAllOf: NSObject, Codable, JSONEncodable { - - public var declawed: Bool? - public var declawedNum: NSNumber? { - get { - return declawed as NSNumber? - } - } - - public init(declawed: Bool? = nil) { - self.declawed = declawed - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case declawed - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(declawed, forKey: .declawed) - } -} - diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift deleted file mode 100644 index 37334bad5f4..00000000000 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift +++ /dev/null @@ -1,32 +0,0 @@ -// -// DogAllOf.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -@objcMembers public class DogAllOf: NSObject, Codable, JSONEncodable { - - public var breed: String? - - public init(breed: String? = nil) { - self.breed = breed - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case breed - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(breed, forKey: .breed) - } -} - diff --git a/samples/client/petstore/swift5/objcCompatible/README.md b/samples/client/petstore/swift5/objcCompatible/README.md index 4b99306b38f..699154010d9 100644 --- a/samples/client/petstore/swift5/objcCompatible/README.md +++ b/samples/client/petstore/swift5/objcCompatible/README.md @@ -73,12 +73,10 @@ Class | Method | HTTP request | Description - [ArrayTest](docs/ArrayTest.md) - [Capitalization](docs/Capitalization.md) - [Cat](docs/Cat.md) - - [CatAllOf](docs/CatAllOf.md) - [Category](docs/Category.md) - [ClassModel](docs/ClassModel.md) - [Client](docs/Client.md) - [Dog](docs/Dog.md) - - [DogAllOf](docs/DogAllOf.md) - [EnumArrays](docs/EnumArrays.md) - [EnumClass](docs/EnumClass.md) - [EnumTest](docs/EnumTest.md) diff --git a/samples/client/petstore/swift5/objcCompatible/docs/CatAllOf.md b/samples/client/petstore/swift5/objcCompatible/docs/CatAllOf.md deleted file mode 100644 index 79789be61c0..00000000000 --- a/samples/client/petstore/swift5/objcCompatible/docs/CatAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# CatAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**declawed** | **Bool** | | [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/swift5/objcCompatible/docs/DogAllOf.md b/samples/client/petstore/swift5/objcCompatible/docs/DogAllOf.md deleted file mode 100644 index 9302ef52e93..00000000000 --- a/samples/client/petstore/swift5/objcCompatible/docs/DogAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# DogAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**breed** | **String** | | [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/swift5/promisekitLibrary/.openapi-generator/FILES b/samples/client/petstore/swift5/promisekitLibrary/.openapi-generator/FILES index 3c712e3da52..2d7a6950406 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/.openapi-generator/FILES +++ b/samples/client/petstore/swift5/promisekitLibrary/.openapi-generator/FILES @@ -26,12 +26,10 @@ PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift PetstoreClient/Classes/OpenAPIs/Models/Cat.swift -PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift PetstoreClient/Classes/OpenAPIs/Models/Category.swift PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift PetstoreClient/Classes/OpenAPIs/Models/Client.swift PetstoreClient/Classes/OpenAPIs/Models/Dog.swift -PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift @@ -72,12 +70,10 @@ docs/ArrayOfNumberOnly.md docs/ArrayTest.md docs/Capitalization.md docs/Cat.md -docs/CatAllOf.md docs/Category.md docs/ClassModel.md docs/Client.md docs/Dog.md -docs/DogAllOf.md docs/EnumArrays.md docs/EnumClass.md docs/EnumTest.md diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift deleted file mode 100644 index 681bcada15f..00000000000 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift +++ /dev/null @@ -1,32 +0,0 @@ -// -// CatAllOf.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct CatAllOf: Codable, JSONEncodable, Hashable { - - public var declawed: Bool? - - public init(declawed: Bool? = nil) { - self.declawed = declawed - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case declawed - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(declawed, forKey: .declawed) - } -} - diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift deleted file mode 100644 index 627bb997c5e..00000000000 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift +++ /dev/null @@ -1,32 +0,0 @@ -// -// DogAllOf.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct DogAllOf: Codable, JSONEncodable, Hashable { - - public var breed: String? - - public init(breed: String? = nil) { - self.breed = breed - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case breed - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(breed, forKey: .breed) - } -} - diff --git a/samples/client/petstore/swift5/promisekitLibrary/README.md b/samples/client/petstore/swift5/promisekitLibrary/README.md index 4b99306b38f..699154010d9 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/README.md +++ b/samples/client/petstore/swift5/promisekitLibrary/README.md @@ -73,12 +73,10 @@ Class | Method | HTTP request | Description - [ArrayTest](docs/ArrayTest.md) - [Capitalization](docs/Capitalization.md) - [Cat](docs/Cat.md) - - [CatAllOf](docs/CatAllOf.md) - [Category](docs/Category.md) - [ClassModel](docs/ClassModel.md) - [Client](docs/Client.md) - [Dog](docs/Dog.md) - - [DogAllOf](docs/DogAllOf.md) - [EnumArrays](docs/EnumArrays.md) - [EnumClass](docs/EnumClass.md) - [EnumTest](docs/EnumTest.md) diff --git a/samples/client/petstore/swift5/promisekitLibrary/docs/CatAllOf.md b/samples/client/petstore/swift5/promisekitLibrary/docs/CatAllOf.md deleted file mode 100644 index 79789be61c0..00000000000 --- a/samples/client/petstore/swift5/promisekitLibrary/docs/CatAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# CatAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**declawed** | **Bool** | | [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/swift5/promisekitLibrary/docs/DogAllOf.md b/samples/client/petstore/swift5/promisekitLibrary/docs/DogAllOf.md deleted file mode 100644 index 9302ef52e93..00000000000 --- a/samples/client/petstore/swift5/promisekitLibrary/docs/DogAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# DogAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**breed** | **String** | | [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/swift5/readonlyProperties/.openapi-generator/FILES b/samples/client/petstore/swift5/readonlyProperties/.openapi-generator/FILES index 3c712e3da52..2d7a6950406 100644 --- a/samples/client/petstore/swift5/readonlyProperties/.openapi-generator/FILES +++ b/samples/client/petstore/swift5/readonlyProperties/.openapi-generator/FILES @@ -26,12 +26,10 @@ PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift PetstoreClient/Classes/OpenAPIs/Models/Cat.swift -PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift PetstoreClient/Classes/OpenAPIs/Models/Category.swift PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift PetstoreClient/Classes/OpenAPIs/Models/Client.swift PetstoreClient/Classes/OpenAPIs/Models/Dog.swift -PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift @@ -72,12 +70,10 @@ docs/ArrayOfNumberOnly.md docs/ArrayTest.md docs/Capitalization.md docs/Cat.md -docs/CatAllOf.md docs/Category.md docs/ClassModel.md docs/Client.md docs/Dog.md -docs/DogAllOf.md docs/EnumArrays.md docs/EnumClass.md docs/EnumTest.md diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift deleted file mode 100644 index 26d078c63b0..00000000000 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift +++ /dev/null @@ -1,32 +0,0 @@ -// -// CatAllOf.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct CatAllOf: Codable, JSONEncodable, Hashable { - - public private(set) var declawed: Bool? - - public init(declawed: Bool? = nil) { - self.declawed = declawed - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case declawed - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(declawed, forKey: .declawed) - } -} - diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift deleted file mode 100644 index 00536fafe47..00000000000 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift +++ /dev/null @@ -1,32 +0,0 @@ -// -// DogAllOf.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct DogAllOf: Codable, JSONEncodable, Hashable { - - public private(set) var breed: String? - - public init(breed: String? = nil) { - self.breed = breed - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case breed - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(breed, forKey: .breed) - } -} - diff --git a/samples/client/petstore/swift5/readonlyProperties/README.md b/samples/client/petstore/swift5/readonlyProperties/README.md index 4b99306b38f..699154010d9 100644 --- a/samples/client/petstore/swift5/readonlyProperties/README.md +++ b/samples/client/petstore/swift5/readonlyProperties/README.md @@ -73,12 +73,10 @@ Class | Method | HTTP request | Description - [ArrayTest](docs/ArrayTest.md) - [Capitalization](docs/Capitalization.md) - [Cat](docs/Cat.md) - - [CatAllOf](docs/CatAllOf.md) - [Category](docs/Category.md) - [ClassModel](docs/ClassModel.md) - [Client](docs/Client.md) - [Dog](docs/Dog.md) - - [DogAllOf](docs/DogAllOf.md) - [EnumArrays](docs/EnumArrays.md) - [EnumClass](docs/EnumClass.md) - [EnumTest](docs/EnumTest.md) diff --git a/samples/client/petstore/swift5/readonlyProperties/docs/CatAllOf.md b/samples/client/petstore/swift5/readonlyProperties/docs/CatAllOf.md deleted file mode 100644 index 79789be61c0..00000000000 --- a/samples/client/petstore/swift5/readonlyProperties/docs/CatAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# CatAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**declawed** | **Bool** | | [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/swift5/readonlyProperties/docs/DogAllOf.md b/samples/client/petstore/swift5/readonlyProperties/docs/DogAllOf.md deleted file mode 100644 index 9302ef52e93..00000000000 --- a/samples/client/petstore/swift5/readonlyProperties/docs/DogAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# DogAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**breed** | **String** | | [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/swift5/resultLibrary/.openapi-generator/FILES b/samples/client/petstore/swift5/resultLibrary/.openapi-generator/FILES index 3c712e3da52..2d7a6950406 100644 --- a/samples/client/petstore/swift5/resultLibrary/.openapi-generator/FILES +++ b/samples/client/petstore/swift5/resultLibrary/.openapi-generator/FILES @@ -26,12 +26,10 @@ PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift PetstoreClient/Classes/OpenAPIs/Models/Cat.swift -PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift PetstoreClient/Classes/OpenAPIs/Models/Category.swift PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift PetstoreClient/Classes/OpenAPIs/Models/Client.swift PetstoreClient/Classes/OpenAPIs/Models/Dog.swift -PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift @@ -72,12 +70,10 @@ docs/ArrayOfNumberOnly.md docs/ArrayTest.md docs/Capitalization.md docs/Cat.md -docs/CatAllOf.md docs/Category.md docs/ClassModel.md docs/Client.md docs/Dog.md -docs/DogAllOf.md docs/EnumArrays.md docs/EnumClass.md docs/EnumTest.md diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift deleted file mode 100644 index 681bcada15f..00000000000 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift +++ /dev/null @@ -1,32 +0,0 @@ -// -// CatAllOf.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct CatAllOf: Codable, JSONEncodable, Hashable { - - public var declawed: Bool? - - public init(declawed: Bool? = nil) { - self.declawed = declawed - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case declawed - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(declawed, forKey: .declawed) - } -} - diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift deleted file mode 100644 index 627bb997c5e..00000000000 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift +++ /dev/null @@ -1,32 +0,0 @@ -// -// DogAllOf.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct DogAllOf: Codable, JSONEncodable, Hashable { - - public var breed: String? - - public init(breed: String? = nil) { - self.breed = breed - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case breed - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(breed, forKey: .breed) - } -} - diff --git a/samples/client/petstore/swift5/resultLibrary/README.md b/samples/client/petstore/swift5/resultLibrary/README.md index 4b99306b38f..699154010d9 100644 --- a/samples/client/petstore/swift5/resultLibrary/README.md +++ b/samples/client/petstore/swift5/resultLibrary/README.md @@ -73,12 +73,10 @@ Class | Method | HTTP request | Description - [ArrayTest](docs/ArrayTest.md) - [Capitalization](docs/Capitalization.md) - [Cat](docs/Cat.md) - - [CatAllOf](docs/CatAllOf.md) - [Category](docs/Category.md) - [ClassModel](docs/ClassModel.md) - [Client](docs/Client.md) - [Dog](docs/Dog.md) - - [DogAllOf](docs/DogAllOf.md) - [EnumArrays](docs/EnumArrays.md) - [EnumClass](docs/EnumClass.md) - [EnumTest](docs/EnumTest.md) diff --git a/samples/client/petstore/swift5/resultLibrary/docs/CatAllOf.md b/samples/client/petstore/swift5/resultLibrary/docs/CatAllOf.md deleted file mode 100644 index 79789be61c0..00000000000 --- a/samples/client/petstore/swift5/resultLibrary/docs/CatAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# CatAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**declawed** | **Bool** | | [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/swift5/resultLibrary/docs/DogAllOf.md b/samples/client/petstore/swift5/resultLibrary/docs/DogAllOf.md deleted file mode 100644 index 9302ef52e93..00000000000 --- a/samples/client/petstore/swift5/resultLibrary/docs/DogAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# DogAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**breed** | **String** | | [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/swift5/rxswiftLibrary/.openapi-generator/FILES b/samples/client/petstore/swift5/rxswiftLibrary/.openapi-generator/FILES index 3c712e3da52..2d7a6950406 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/.openapi-generator/FILES +++ b/samples/client/petstore/swift5/rxswiftLibrary/.openapi-generator/FILES @@ -26,12 +26,10 @@ PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift PetstoreClient/Classes/OpenAPIs/Models/Cat.swift -PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift PetstoreClient/Classes/OpenAPIs/Models/Category.swift PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift PetstoreClient/Classes/OpenAPIs/Models/Client.swift PetstoreClient/Classes/OpenAPIs/Models/Dog.swift -PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift @@ -72,12 +70,10 @@ docs/ArrayOfNumberOnly.md docs/ArrayTest.md docs/Capitalization.md docs/Cat.md -docs/CatAllOf.md docs/Category.md docs/ClassModel.md docs/Client.md docs/Dog.md -docs/DogAllOf.md docs/EnumArrays.md docs/EnumClass.md docs/EnumTest.md diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift deleted file mode 100644 index 681bcada15f..00000000000 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift +++ /dev/null @@ -1,32 +0,0 @@ -// -// CatAllOf.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct CatAllOf: Codable, JSONEncodable, Hashable { - - public var declawed: Bool? - - public init(declawed: Bool? = nil) { - self.declawed = declawed - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case declawed - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(declawed, forKey: .declawed) - } -} - diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift deleted file mode 100644 index 627bb997c5e..00000000000 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift +++ /dev/null @@ -1,32 +0,0 @@ -// -// DogAllOf.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct DogAllOf: Codable, JSONEncodable, Hashable { - - public var breed: String? - - public init(breed: String? = nil) { - self.breed = breed - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case breed - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(breed, forKey: .breed) - } -} - diff --git a/samples/client/petstore/swift5/rxswiftLibrary/README.md b/samples/client/petstore/swift5/rxswiftLibrary/README.md index 4b99306b38f..699154010d9 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/README.md +++ b/samples/client/petstore/swift5/rxswiftLibrary/README.md @@ -73,12 +73,10 @@ Class | Method | HTTP request | Description - [ArrayTest](docs/ArrayTest.md) - [Capitalization](docs/Capitalization.md) - [Cat](docs/Cat.md) - - [CatAllOf](docs/CatAllOf.md) - [Category](docs/Category.md) - [ClassModel](docs/ClassModel.md) - [Client](docs/Client.md) - [Dog](docs/Dog.md) - - [DogAllOf](docs/DogAllOf.md) - [EnumArrays](docs/EnumArrays.md) - [EnumClass](docs/EnumClass.md) - [EnumTest](docs/EnumTest.md) diff --git a/samples/client/petstore/swift5/rxswiftLibrary/docs/CatAllOf.md b/samples/client/petstore/swift5/rxswiftLibrary/docs/CatAllOf.md deleted file mode 100644 index 79789be61c0..00000000000 --- a/samples/client/petstore/swift5/rxswiftLibrary/docs/CatAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# CatAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**declawed** | **Bool** | | [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/swift5/rxswiftLibrary/docs/DogAllOf.md b/samples/client/petstore/swift5/rxswiftLibrary/docs/DogAllOf.md deleted file mode 100644 index 9302ef52e93..00000000000 --- a/samples/client/petstore/swift5/rxswiftLibrary/docs/DogAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# DogAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**breed** | **String** | | [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/swift5/urlsessionLibrary/.openapi-generator/FILES b/samples/client/petstore/swift5/urlsessionLibrary/.openapi-generator/FILES index c80b3455682..a7cd348b241 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/.openapi-generator/FILES +++ b/samples/client/petstore/swift5/urlsessionLibrary/.openapi-generator/FILES @@ -27,12 +27,10 @@ Sources/PetstoreClient/Models/ArrayOfNumberOnly.swift Sources/PetstoreClient/Models/ArrayTest.swift Sources/PetstoreClient/Models/Capitalization.swift Sources/PetstoreClient/Models/Cat.swift -Sources/PetstoreClient/Models/CatAllOf.swift Sources/PetstoreClient/Models/Category.swift Sources/PetstoreClient/Models/ClassModel.swift Sources/PetstoreClient/Models/Client.swift Sources/PetstoreClient/Models/Dog.swift -Sources/PetstoreClient/Models/DogAllOf.swift Sources/PetstoreClient/Models/EnumArrays.swift Sources/PetstoreClient/Models/EnumClass.swift Sources/PetstoreClient/Models/EnumTest.swift @@ -72,12 +70,10 @@ docs/ArrayOfNumberOnly.md docs/ArrayTest.md docs/Capitalization.md docs/Cat.md -docs/CatAllOf.md docs/Category.md docs/ClassModel.md docs/Client.md docs/Dog.md -docs/DogAllOf.md docs/EnumArrays.md docs/EnumClass.md docs/EnumTest.md diff --git a/samples/client/petstore/swift5/urlsessionLibrary/README.md b/samples/client/petstore/swift5/urlsessionLibrary/README.md index 4b99306b38f..699154010d9 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/README.md +++ b/samples/client/petstore/swift5/urlsessionLibrary/README.md @@ -73,12 +73,10 @@ Class | Method | HTTP request | Description - [ArrayTest](docs/ArrayTest.md) - [Capitalization](docs/Capitalization.md) - [Cat](docs/Cat.md) - - [CatAllOf](docs/CatAllOf.md) - [Category](docs/Category.md) - [ClassModel](docs/ClassModel.md) - [Client](docs/Client.md) - [Dog](docs/Dog.md) - - [DogAllOf](docs/DogAllOf.md) - [EnumArrays](docs/EnumArrays.md) - [EnumClass](docs/EnumClass.md) - [EnumTest](docs/EnumTest.md) diff --git a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/CatAllOf.swift b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/CatAllOf.swift deleted file mode 100644 index b92fe697f1c..00000000000 --- a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/CatAllOf.swift +++ /dev/null @@ -1,48 +0,0 @@ -// -// CatAllOf.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -@available(*, deprecated, renamed: "PetstoreClientAPI.CatAllOf") -public typealias CatAllOf = PetstoreClientAPI.CatAllOf - -extension PetstoreClientAPI { - -public final class CatAllOf: Codable, JSONEncodable, Hashable { - - public var declawed: Bool? - - public init(declawed: Bool? = nil) { - self.declawed = declawed - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case declawed - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(declawed, forKey: .declawed) - } - - public static func == (lhs: CatAllOf, rhs: CatAllOf) -> Bool { - lhs.declawed == rhs.declawed - - } - - public func hash(into hasher: inout Hasher) { - hasher.combine(declawed?.hashValue) - - } -} - -} diff --git a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/DogAllOf.swift b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/DogAllOf.swift deleted file mode 100644 index c8de40cab7b..00000000000 --- a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/DogAllOf.swift +++ /dev/null @@ -1,48 +0,0 @@ -// -// DogAllOf.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -@available(*, deprecated, renamed: "PetstoreClientAPI.DogAllOf") -public typealias DogAllOf = PetstoreClientAPI.DogAllOf - -extension PetstoreClientAPI { - -public final class DogAllOf: Codable, JSONEncodable, Hashable { - - public var breed: String? - - public init(breed: String? = nil) { - self.breed = breed - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case breed - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(breed, forKey: .breed) - } - - public static func == (lhs: DogAllOf, rhs: DogAllOf) -> Bool { - lhs.breed == rhs.breed - - } - - public func hash(into hasher: inout Hasher) { - hasher.combine(breed?.hashValue) - - } -} - -} diff --git a/samples/client/petstore/swift5/urlsessionLibrary/docs/CatAllOf.md b/samples/client/petstore/swift5/urlsessionLibrary/docs/CatAllOf.md deleted file mode 100644 index 79789be61c0..00000000000 --- a/samples/client/petstore/swift5/urlsessionLibrary/docs/CatAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# CatAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**declawed** | **Bool** | | [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/swift5/urlsessionLibrary/docs/DogAllOf.md b/samples/client/petstore/swift5/urlsessionLibrary/docs/DogAllOf.md deleted file mode 100644 index 9302ef52e93..00000000000 --- a/samples/client/petstore/swift5/urlsessionLibrary/docs/DogAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# DogAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**breed** | **String** | | [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/swift5/vaporLibrary/.openapi-generator/FILES b/samples/client/petstore/swift5/vaporLibrary/.openapi-generator/FILES index ee9d642f03a..62db9841dae 100644 --- a/samples/client/petstore/swift5/vaporLibrary/.openapi-generator/FILES +++ b/samples/client/petstore/swift5/vaporLibrary/.openapi-generator/FILES @@ -26,15 +26,12 @@ Sources/PetstoreClient/Models/ArrayOfArrayOfNumberOnly.swift Sources/PetstoreClient/Models/ArrayOfNumberOnly.swift Sources/PetstoreClient/Models/ArrayTest.swift Sources/PetstoreClient/Models/BigCat.swift -Sources/PetstoreClient/Models/BigCatAllOf.swift Sources/PetstoreClient/Models/Capitalization.swift Sources/PetstoreClient/Models/Cat.swift -Sources/PetstoreClient/Models/CatAllOf.swift Sources/PetstoreClient/Models/Category.swift Sources/PetstoreClient/Models/ClassModel.swift Sources/PetstoreClient/Models/Client.swift Sources/PetstoreClient/Models/Dog.swift -Sources/PetstoreClient/Models/DogAllOf.swift Sources/PetstoreClient/Models/EnumArrays.swift Sources/PetstoreClient/Models/EnumClass.swift Sources/PetstoreClient/Models/EnumTest.swift @@ -79,15 +76,12 @@ docs/ArrayOfArrayOfNumberOnly.md docs/ArrayOfNumberOnly.md docs/ArrayTest.md docs/BigCat.md -docs/BigCatAllOf.md docs/Capitalization.md docs/Cat.md -docs/CatAllOf.md docs/Category.md docs/ClassModel.md docs/Client.md docs/Dog.md -docs/DogAllOf.md docs/EnumArrays.md docs/EnumClass.md docs/EnumTest.md diff --git a/samples/client/petstore/swift5/vaporLibrary/README.md b/samples/client/petstore/swift5/vaporLibrary/README.md index f06393a4070..61e728c5357 100644 --- a/samples/client/petstore/swift5/vaporLibrary/README.md +++ b/samples/client/petstore/swift5/vaporLibrary/README.md @@ -77,15 +77,12 @@ Class | Method | HTTP request | Description - [ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md) - [ArrayTest](docs/ArrayTest.md) - [BigCat](docs/BigCat.md) - - [BigCatAllOf](docs/BigCatAllOf.md) - [Capitalization](docs/Capitalization.md) - [Cat](docs/Cat.md) - - [CatAllOf](docs/CatAllOf.md) - [Category](docs/Category.md) - [ClassModel](docs/ClassModel.md) - [Client](docs/Client.md) - [Dog](docs/Dog.md) - - [DogAllOf](docs/DogAllOf.md) - [EnumArrays](docs/EnumArrays.md) - [EnumClass](docs/EnumClass.md) - [EnumTest](docs/EnumTest.md) diff --git a/samples/client/petstore/swift5/vaporLibrary/Sources/PetstoreClient/Models/BigCatAllOf.swift b/samples/client/petstore/swift5/vaporLibrary/Sources/PetstoreClient/Models/BigCatAllOf.swift deleted file mode 100644 index 0945e87ed9c..00000000000 --- a/samples/client/petstore/swift5/vaporLibrary/Sources/PetstoreClient/Models/BigCatAllOf.swift +++ /dev/null @@ -1,49 +0,0 @@ -// -// BigCatAllOf.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif -import Vapor - -public final class BigCatAllOf: Content, Hashable { - - public enum Kind: String, Content, Hashable, CaseIterable { - case lions = "lions" - case tigers = "tigers" - case leopards = "leopards" - case jaguars = "jaguars" - } - public var kind: Kind? - - public init(kind: Kind? = nil) { - self.kind = kind - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case kind - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(kind, forKey: .kind) - } - - public static func == (lhs: BigCatAllOf, rhs: BigCatAllOf) -> Bool { - lhs.kind == rhs.kind - - } - - public func hash(into hasher: inout Hasher) { - hasher.combine(kind?.hashValue) - - } -} - diff --git a/samples/client/petstore/swift5/vaporLibrary/Sources/PetstoreClient/Models/CatAllOf.swift b/samples/client/petstore/swift5/vaporLibrary/Sources/PetstoreClient/Models/CatAllOf.swift deleted file mode 100644 index 2cfbd9fd02d..00000000000 --- a/samples/client/petstore/swift5/vaporLibrary/Sources/PetstoreClient/Models/CatAllOf.swift +++ /dev/null @@ -1,43 +0,0 @@ -// -// CatAllOf.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif -import Vapor - -public final class CatAllOf: Content, Hashable { - - public var declawed: Bool? - - public init(declawed: Bool? = nil) { - self.declawed = declawed - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case declawed - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(declawed, forKey: .declawed) - } - - public static func == (lhs: CatAllOf, rhs: CatAllOf) -> Bool { - lhs.declawed == rhs.declawed - - } - - public func hash(into hasher: inout Hasher) { - hasher.combine(declawed?.hashValue) - - } -} - diff --git a/samples/client/petstore/swift5/vaporLibrary/Sources/PetstoreClient/Models/DogAllOf.swift b/samples/client/petstore/swift5/vaporLibrary/Sources/PetstoreClient/Models/DogAllOf.swift deleted file mode 100644 index 69352b02b13..00000000000 --- a/samples/client/petstore/swift5/vaporLibrary/Sources/PetstoreClient/Models/DogAllOf.swift +++ /dev/null @@ -1,43 +0,0 @@ -// -// DogAllOf.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif -import Vapor - -public final class DogAllOf: Content, Hashable { - - public var breed: String? - - public init(breed: String? = nil) { - self.breed = breed - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case breed - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(breed, forKey: .breed) - } - - public static func == (lhs: DogAllOf, rhs: DogAllOf) -> Bool { - lhs.breed == rhs.breed - - } - - public func hash(into hasher: inout Hasher) { - hasher.combine(breed?.hashValue) - - } -} - diff --git a/samples/client/petstore/swift5/vaporLibrary/docs/BigCatAllOf.md b/samples/client/petstore/swift5/vaporLibrary/docs/BigCatAllOf.md deleted file mode 100644 index 20da4caf5d0..00000000000 --- a/samples/client/petstore/swift5/vaporLibrary/docs/BigCatAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# BigCatAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**kind** | **String** | | [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/swift5/vaporLibrary/docs/CatAllOf.md b/samples/client/petstore/swift5/vaporLibrary/docs/CatAllOf.md deleted file mode 100644 index 79789be61c0..00000000000 --- a/samples/client/petstore/swift5/vaporLibrary/docs/CatAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# CatAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**declawed** | **Bool** | | [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/swift5/vaporLibrary/docs/DogAllOf.md b/samples/client/petstore/swift5/vaporLibrary/docs/DogAllOf.md deleted file mode 100644 index 9302ef52e93..00000000000 --- a/samples/client/petstore/swift5/vaporLibrary/docs/DogAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# DogAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**breed** | **String** | | [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/swift5/x-swift-hashable/.openapi-generator/FILES b/samples/client/petstore/swift5/x-swift-hashable/.openapi-generator/FILES index 3c712e3da52..2d7a6950406 100644 --- a/samples/client/petstore/swift5/x-swift-hashable/.openapi-generator/FILES +++ b/samples/client/petstore/swift5/x-swift-hashable/.openapi-generator/FILES @@ -26,12 +26,10 @@ PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift PetstoreClient/Classes/OpenAPIs/Models/Cat.swift -PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift PetstoreClient/Classes/OpenAPIs/Models/Category.swift PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift PetstoreClient/Classes/OpenAPIs/Models/Client.swift PetstoreClient/Classes/OpenAPIs/Models/Dog.swift -PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift @@ -72,12 +70,10 @@ docs/ArrayOfNumberOnly.md docs/ArrayTest.md docs/Capitalization.md docs/Cat.md -docs/CatAllOf.md docs/Category.md docs/ClassModel.md docs/Client.md docs/Dog.md -docs/DogAllOf.md docs/EnumArrays.md docs/EnumClass.md docs/EnumTest.md diff --git a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/BigCatAllOf.swift b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/BigCatAllOf.swift deleted file mode 100644 index b7c03fe8821..00000000000 --- a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/BigCatAllOf.swift +++ /dev/null @@ -1,37 +0,0 @@ -// -// BigCatAllOf.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -import AnyCodable - -public struct BigCatAllOf: Codable { - - public enum Kind: String, Codable, CaseIterable { - case lions = "lions" - case tigers = "tigers" - case leopards = "leopards" - case jaguars = "jaguars" - } - public var kind: Kind? - - public init(kind: Kind? = nil) { - self.kind = kind - } - public enum CodingKeys: String, CodingKey, CaseIterable { - case kind - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(kind, forKey: .kind) - } - - - -} diff --git a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift deleted file mode 100644 index 80814e4a9cc..00000000000 --- a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift +++ /dev/null @@ -1,32 +0,0 @@ -// -// CatAllOf.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct CatAllOf: Codable, JSONEncodable { - - public var declawed: Bool? - - public init(declawed: Bool? = nil) { - self.declawed = declawed - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case declawed - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(declawed, forKey: .declawed) - } -} - diff --git a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift deleted file mode 100644 index 16cbfcd3e70..00000000000 --- a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift +++ /dev/null @@ -1,32 +0,0 @@ -// -// DogAllOf.swift -// -// Generated by openapi-generator -// https://openapi-generator.tech -// - -import Foundation -#if canImport(AnyCodable) -import AnyCodable -#endif - -public struct DogAllOf: Codable, JSONEncodable { - - public var breed: String? - - public init(breed: String? = nil) { - self.breed = breed - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case breed - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encodeIfPresent(breed, forKey: .breed) - } -} - diff --git a/samples/client/petstore/swift5/x-swift-hashable/README.md b/samples/client/petstore/swift5/x-swift-hashable/README.md index 4b99306b38f..699154010d9 100644 --- a/samples/client/petstore/swift5/x-swift-hashable/README.md +++ b/samples/client/petstore/swift5/x-swift-hashable/README.md @@ -73,12 +73,10 @@ Class | Method | HTTP request | Description - [ArrayTest](docs/ArrayTest.md) - [Capitalization](docs/Capitalization.md) - [Cat](docs/Cat.md) - - [CatAllOf](docs/CatAllOf.md) - [Category](docs/Category.md) - [ClassModel](docs/ClassModel.md) - [Client](docs/Client.md) - [Dog](docs/Dog.md) - - [DogAllOf](docs/DogAllOf.md) - [EnumArrays](docs/EnumArrays.md) - [EnumClass](docs/EnumClass.md) - [EnumTest](docs/EnumTest.md) diff --git a/samples/client/petstore/swift5/x-swift-hashable/docs/BigCatAllOf.md b/samples/client/petstore/swift5/x-swift-hashable/docs/BigCatAllOf.md deleted file mode 100644 index 20da4caf5d0..00000000000 --- a/samples/client/petstore/swift5/x-swift-hashable/docs/BigCatAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# BigCatAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**kind** | **String** | | [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/swift5/x-swift-hashable/docs/CatAllOf.md b/samples/client/petstore/swift5/x-swift-hashable/docs/CatAllOf.md deleted file mode 100644 index 79789be61c0..00000000000 --- a/samples/client/petstore/swift5/x-swift-hashable/docs/CatAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# CatAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**declawed** | **Bool** | | [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/swift5/x-swift-hashable/docs/DogAllOf.md b/samples/client/petstore/swift5/x-swift-hashable/docs/DogAllOf.md deleted file mode 100644 index 9302ef52e93..00000000000 --- a/samples/client/petstore/swift5/x-swift-hashable/docs/DogAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# DogAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**breed** | **String** | | [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/typescript-axios/builds/composed-schemas/api.ts b/samples/client/petstore/typescript-axios/builds/composed-schemas/api.ts index bcb2ac3660d..f6e6dcfe259 100644 --- a/samples/client/petstore/typescript-axios/builds/composed-schemas/api.ts +++ b/samples/client/petstore/typescript-axios/builds/composed-schemas/api.ts @@ -42,25 +42,6 @@ export interface Cat { */ 'age'?: number; } -/** - * - * @export - * @interface CatAllOf - */ -export interface CatAllOf { - /** - * - * @type {boolean} - * @memberof CatAllOf - */ - 'hunts'?: boolean; - /** - * - * @type {number} - * @memberof CatAllOf - */ - 'age'?: number; -} /** * * @export @@ -90,35 +71,6 @@ export const DogBreedEnum = { export type DogBreedEnum = typeof DogBreedEnum[keyof typeof DogBreedEnum]; -/** - * - * @export - * @interface DogAllOf - */ -export interface DogAllOf { - /** - * - * @type {boolean} - * @memberof DogAllOf - */ - 'bark'?: boolean; - /** - * - * @type {string} - * @memberof DogAllOf - */ - 'breed'?: DogAllOfBreedEnum; -} - -export const DogAllOfBreedEnum = { - Dingo: 'Dingo', - Husky: 'Husky', - Retriever: 'Retriever', - Shepherd: 'Shepherd' -} as const; - -export type DogAllOfBreedEnum = typeof DogAllOfBreedEnum[keyof typeof DogAllOfBreedEnum]; - /** * * @export diff --git a/samples/client/petstore/typescript-axios/builds/test-petstore/api.ts b/samples/client/petstore/typescript-axios/builds/test-petstore/api.ts index 647afdc57dc..316fb94fade 100644 --- a/samples/client/petstore/typescript-axios/builds/test-petstore/api.ts +++ b/samples/client/petstore/typescript-axios/builds/test-petstore/api.ts @@ -312,19 +312,6 @@ export interface Cat extends Animal { */ 'declawed'?: boolean; } -/** - * - * @export - * @interface CatAllOf - */ -export interface CatAllOf { - /** - * - * @type {boolean} - * @memberof CatAllOf - */ - 'declawed'?: boolean; -} /** * * @export @@ -370,32 +357,6 @@ export const ChildCatPetTypeEnum = { export type ChildCatPetTypeEnum = typeof ChildCatPetTypeEnum[keyof typeof ChildCatPetTypeEnum]; -/** - * - * @export - * @interface ChildCatAllOf - */ -export interface ChildCatAllOf { - /** - * - * @type {string} - * @memberof ChildCatAllOf - */ - 'name'?: string; - /** - * - * @type {string} - * @memberof ChildCatAllOf - */ - 'pet_type'?: ChildCatAllOfPetTypeEnum; -} - -export const ChildCatAllOfPetTypeEnum = { - ChildCat: 'ChildCat' -} as const; - -export type ChildCatAllOfPetTypeEnum = typeof ChildCatAllOfPetTypeEnum[keyof typeof ChildCatAllOfPetTypeEnum]; - /** * Model for testing model with \"_class\" property * @export @@ -480,19 +441,6 @@ export interface Dog extends Animal { */ 'breed'?: string; } -/** - * - * @export - * @interface DogAllOf - */ -export interface DogAllOf { - /** - * - * @type {string} - * @memberof DogAllOf - */ - 'breed'?: string; -} /** * * @export diff --git a/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/api.ts b/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/api.ts index 0fa21c1a1be..e23aa4f6869 100644 --- a/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/api.ts +++ b/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/api.ts @@ -259,19 +259,6 @@ export interface Cat extends Animal { */ 'declawed'?: boolean; } -/** - * - * @export - * @interface CatAllOf - */ -export interface CatAllOf { - /** - * - * @type {boolean} - * @memberof CatAllOf - */ - 'declawed'?: boolean; -} /** * * @export @@ -330,19 +317,6 @@ export interface Dog extends Animal { */ 'breed'?: string; } -/** - * - * @export - * @interface DogAllOf - */ -export interface DogAllOf { - /** - * - * @type {string} - * @memberof DogAllOf - */ - 'breed'?: string; -} /** * * @export diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/.openapi-generator/FILES b/samples/client/petstore/typescript-fetch/builds/default-v3.0/.openapi-generator/FILES index 57bd4d35573..0015dca0c83 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/.openapi-generator/FILES +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/.openapi-generator/FILES @@ -15,13 +15,11 @@ models/ArrayOfNumberOnly.ts models/ArrayTest.ts models/Capitalization.ts models/Cat.ts -models/CatAllOf.ts models/Category.ts models/ClassModel.ts models/Client.ts models/DeprecatedObject.ts models/Dog.ts -models/DogAllOf.ts models/EnumArrays.ts models/EnumClass.ts models/EnumTest.ts diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/CatAllOf.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/CatAllOf.ts deleted file mode 100644 index 1256a21fea8..00000000000 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/CatAllOf.ts +++ /dev/null @@ -1,65 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * 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: \" \\ - * - * The version of the OpenAPI document: 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 { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface CatAllOf - */ -export interface CatAllOf { - /** - * - * @type {boolean} - * @memberof CatAllOf - */ - declawed?: boolean; -} - -/** - * Check if a given object implements the CatAllOf interface. - */ -export function instanceOfCatAllOf(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function CatAllOfFromJSON(json: any): CatAllOf { - return CatAllOfFromJSONTyped(json, false); -} - -export function CatAllOfFromJSONTyped(json: any, ignoreDiscriminator: boolean): CatAllOf { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'declawed': !exists(json, 'declawed') ? undefined : json['declawed'], - }; -} - -export function CatAllOfToJSON(value?: CatAllOf | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'declawed': value.declawed, - }; -} - diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/DogAllOf.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/DogAllOf.ts deleted file mode 100644 index 35034bbd490..00000000000 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/DogAllOf.ts +++ /dev/null @@ -1,65 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * 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: \" \\ - * - * The version of the OpenAPI document: 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 { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface DogAllOf - */ -export interface DogAllOf { - /** - * - * @type {string} - * @memberof DogAllOf - */ - breed?: string; -} - -/** - * Check if a given object implements the DogAllOf interface. - */ -export function instanceOfDogAllOf(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function DogAllOfFromJSON(json: any): DogAllOf { - return DogAllOfFromJSONTyped(json, false); -} - -export function DogAllOfFromJSONTyped(json: any, ignoreDiscriminator: boolean): DogAllOf { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'breed': !exists(json, 'breed') ? undefined : json['breed'], - }; -} - -export function DogAllOfToJSON(value?: DogAllOf | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'breed': value.breed, - }; -} - diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/index.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/index.ts index 1f1b4adccec..20b510f62cb 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/index.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/models/index.ts @@ -8,13 +8,11 @@ export * from './ArrayOfNumberOnly'; export * from './ArrayTest'; export * from './Capitalization'; export * from './Cat'; -export * from './CatAllOf'; export * from './Category'; export * from './ClassModel'; export * from './Client'; export * from './DeprecatedObject'; export * from './Dog'; -export * from './DogAllOf'; export * from './EnumArrays'; export * from './EnumClass'; export * from './EnumTest'; diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/.openapi-generator/FILES b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/.openapi-generator/FILES index cf5312fb0ea..fd331c256c8 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/.openapi-generator/FILES +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/.openapi-generator/FILES @@ -12,13 +12,11 @@ doc/ArrayOfNumberOnly.md doc/ArrayTest.md doc/Capitalization.md doc/Cat.md -doc/CatAllOf.md doc/Category.md doc/ClassModel.md doc/DefaultApi.md doc/DeprecatedObject.md doc/Dog.md -doc/DogAllOf.md doc/EnumArrays.md doc/EnumTest.md doc/FakeApi.md @@ -82,12 +80,10 @@ lib/src/model/array_of_number_only.dart lib/src/model/array_test.dart lib/src/model/capitalization.dart lib/src/model/cat.dart -lib/src/model/cat_all_of.dart lib/src/model/category.dart lib/src/model/class_model.dart lib/src/model/deprecated_object.dart lib/src/model/dog.dart -lib/src/model/dog_all_of.dart lib/src/model/enum_arrays.dart lib/src/model/enum_test.dart lib/src/model/fake_big_decimal_map200_response.dart diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/README.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/README.md index 85f751287ad..5b0e2fa1081 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/README.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/README.md @@ -120,12 +120,10 @@ Class | Method | HTTP request | Description - [ArrayTest](doc/ArrayTest.md) - [Capitalization](doc/Capitalization.md) - [Cat](doc/Cat.md) - - [CatAllOf](doc/CatAllOf.md) - [Category](doc/Category.md) - [ClassModel](doc/ClassModel.md) - [DeprecatedObject](doc/DeprecatedObject.md) - [Dog](doc/Dog.md) - - [DogAllOf](doc/DogAllOf.md) - [EnumArrays](doc/EnumArrays.md) - [EnumTest](doc/EnumTest.md) - [FakeBigDecimalMap200Response](doc/FakeBigDecimalMap200Response.md) diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/CatAllOf.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/CatAllOf.md deleted file mode 100644 index 36b2ae0e8ab..00000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/CatAllOf.md +++ /dev/null @@ -1,15 +0,0 @@ -# openapi.model.CatAllOf - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**declawed** | **bool** | | [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/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/DogAllOf.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/DogAllOf.md deleted file mode 100644 index 97a7c8fba49..00000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/DogAllOf.md +++ /dev/null @@ -1,15 +0,0 @@ -# openapi.model.DogAllOf - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**breed** | **String** | | [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/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/openapi.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/openapi.dart index 0cb4a8a490a..48d2103d57d 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/openapi.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/openapi.dart @@ -25,12 +25,10 @@ export 'package:openapi/src/model/array_of_number_only.dart'; export 'package:openapi/src/model/array_test.dart'; export 'package:openapi/src/model/capitalization.dart'; export 'package:openapi/src/model/cat.dart'; -export 'package:openapi/src/model/cat_all_of.dart'; export 'package:openapi/src/model/category.dart'; export 'package:openapi/src/model/class_model.dart'; export 'package:openapi/src/model/deprecated_object.dart'; export 'package:openapi/src/model/dog.dart'; -export 'package:openapi/src/model/dog_all_of.dart'; export 'package:openapi/src/model/enum_arrays.dart'; export 'package:openapi/src/model/enum_test.dart'; export 'package:openapi/src/model/fake_big_decimal_map200_response.dart'; diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/deserialize.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/deserialize.dart index cdd4ca6e0b8..8babb656e60 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/deserialize.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/deserialize.dart @@ -7,12 +7,10 @@ import 'package:openapi/src/model/array_of_number_only.dart'; import 'package:openapi/src/model/array_test.dart'; import 'package:openapi/src/model/capitalization.dart'; import 'package:openapi/src/model/cat.dart'; -import 'package:openapi/src/model/cat_all_of.dart'; import 'package:openapi/src/model/category.dart'; import 'package:openapi/src/model/class_model.dart'; import 'package:openapi/src/model/deprecated_object.dart'; import 'package:openapi/src/model/dog.dart'; -import 'package:openapi/src/model/dog_all_of.dart'; import 'package:openapi/src/model/enum_arrays.dart'; import 'package:openapi/src/model/enum_test.dart'; import 'package:openapi/src/model/fake_big_decimal_map200_response.dart'; @@ -78,8 +76,6 @@ final _regMap = RegExp(r'^Map$'); return Capitalization.fromJson(value as Map) as ReturnType; case 'Cat': return Cat.fromJson(value as Map) as ReturnType; - case 'CatAllOf': - return CatAllOf.fromJson(value as Map) as ReturnType; case 'Category': return Category.fromJson(value as Map) as ReturnType; case 'ClassModel': @@ -88,8 +84,6 @@ final _regMap = RegExp(r'^Map$'); return DeprecatedObject.fromJson(value as Map) as ReturnType; case 'Dog': return Dog.fromJson(value as Map) as ReturnType; - case 'DogAllOf': - return DogAllOf.fromJson(value as Map) as ReturnType; case 'EnumArrays': return EnumArrays.fromJson(value as Map) as ReturnType; case 'EnumTest': diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/cat_all_of.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/cat_all_of.dart deleted file mode 100644 index abb9dbc25e5..00000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/cat_all_of.dart +++ /dev/null @@ -1,54 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// - -// ignore_for_file: unused_element -import 'package:json_annotation/json_annotation.dart'; - -part 'cat_all_of.g.dart'; - - -@JsonSerializable( - checked: true, - createToJson: true, - disallowUnrecognizedKeys: false, - explicitToJson: true, -) -class CatAllOf { - /// Returns a new [CatAllOf] instance. - CatAllOf({ - - this.declawed, - }); - - @JsonKey( - - name: r'declawed', - required: false, - includeIfNull: false - ) - - - final bool? declawed; - - - - @override - bool operator ==(Object other) => identical(this, other) || other is CatAllOf && - other.declawed == declawed; - - @override - int get hashCode => - declawed.hashCode; - - factory CatAllOf.fromJson(Map json) => _$CatAllOfFromJson(json); - - Map toJson() => _$CatAllOfToJson(this); - - @override - String toString() { - return toJson().toString(); - } - -} - diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/dog_all_of.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/dog_all_of.dart deleted file mode 100644 index 19bd4c0267b..00000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/dog_all_of.dart +++ /dev/null @@ -1,54 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// - -// ignore_for_file: unused_element -import 'package:json_annotation/json_annotation.dart'; - -part 'dog_all_of.g.dart'; - - -@JsonSerializable( - checked: true, - createToJson: true, - disallowUnrecognizedKeys: false, - explicitToJson: true, -) -class DogAllOf { - /// Returns a new [DogAllOf] instance. - DogAllOf({ - - this.breed, - }); - - @JsonKey( - - name: r'breed', - required: false, - includeIfNull: false - ) - - - final String? breed; - - - - @override - bool operator ==(Object other) => identical(this, other) || other is DogAllOf && - other.breed == breed; - - @override - int get hashCode => - breed.hashCode; - - factory DogAllOf.fromJson(Map json) => _$DogAllOfFromJson(json); - - Map toJson() => _$DogAllOfToJson(this); - - @override - String toString() { - return toJson().toString(); - } - -} - diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/test/cat_all_of_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/test/cat_all_of_test.dart deleted file mode 100644 index c22efb324be..00000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/test/cat_all_of_test.dart +++ /dev/null @@ -1,16 +0,0 @@ -import 'package:test/test.dart'; -import 'package:openapi/openapi.dart'; - -// tests for CatAllOf -void main() { - final CatAllOf? instance = /* CatAllOf(...) */ null; - // TODO add properties to the entity - - group(CatAllOf, () { - // bool declawed - test('to test the property `declawed`', () async { - // TODO - }); - - }); -} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/test/dog_all_of_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/test/dog_all_of_test.dart deleted file mode 100644 index f5e191fea69..00000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/test/dog_all_of_test.dart +++ /dev/null @@ -1,16 +0,0 @@ -import 'package:test/test.dart'; -import 'package:openapi/openapi.dart'; - -// tests for DogAllOf -void main() { - final DogAllOf? instance = /* DogAllOf(...) */ null; - // TODO add properties to the entity - - group(DogAllOf, () { - // String breed - test('to test the property `breed`', () async { - // TODO - }); - - }); -} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/.openapi-generator/FILES b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/.openapi-generator/FILES index a4c5dcbdac1..1172e4bb425 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/.openapi-generator/FILES +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/.openapi-generator/FILES @@ -11,13 +11,11 @@ doc/ArrayOfNumberOnly.md doc/ArrayTest.md doc/Capitalization.md doc/Cat.md -doc/CatAllOf.md doc/Category.md doc/ClassModel.md doc/DefaultApi.md doc/DeprecatedObject.md doc/Dog.md -doc/DogAllOf.md doc/EnumArrays.md doc/EnumTest.md doc/FakeApi.md @@ -82,13 +80,11 @@ lib/src/model/array_of_number_only.dart lib/src/model/array_test.dart lib/src/model/capitalization.dart lib/src/model/cat.dart -lib/src/model/cat_all_of.dart lib/src/model/category.dart lib/src/model/class_model.dart lib/src/model/date.dart lib/src/model/deprecated_object.dart lib/src/model/dog.dart -lib/src/model/dog_all_of.dart lib/src/model/enum_arrays.dart lib/src/model/enum_test.dart lib/src/model/fake_big_decimal_map200_response.dart diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/README.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/README.md index d471886acd6..e3944952f2d 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/README.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/README.md @@ -119,12 +119,10 @@ Class | Method | HTTP request | Description - [ArrayTest](doc/ArrayTest.md) - [Capitalization](doc/Capitalization.md) - [Cat](doc/Cat.md) - - [CatAllOf](doc/CatAllOf.md) - [Category](doc/Category.md) - [ClassModel](doc/ClassModel.md) - [DeprecatedObject](doc/DeprecatedObject.md) - [Dog](doc/Dog.md) - - [DogAllOf](doc/DogAllOf.md) - [EnumArrays](doc/EnumArrays.md) - [EnumTest](doc/EnumTest.md) - [FakeBigDecimalMap200Response](doc/FakeBigDecimalMap200Response.md) diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/CatAllOf.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/CatAllOf.md deleted file mode 100644 index 36b2ae0e8ab..00000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/CatAllOf.md +++ /dev/null @@ -1,15 +0,0 @@ -# openapi.model.CatAllOf - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**declawed** | **bool** | | [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/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/DogAllOf.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/DogAllOf.md deleted file mode 100644 index 97a7c8fba49..00000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/DogAllOf.md +++ /dev/null @@ -1,15 +0,0 @@ -# openapi.model.DogAllOf - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**breed** | **String** | | [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/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/openapi.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/openapi.dart index 688f7456517..76140c466d3 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/openapi.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/openapi.dart @@ -26,12 +26,10 @@ export 'package:openapi/src/model/array_of_number_only.dart'; export 'package:openapi/src/model/array_test.dart'; export 'package:openapi/src/model/capitalization.dart'; export 'package:openapi/src/model/cat.dart'; -export 'package:openapi/src/model/cat_all_of.dart'; export 'package:openapi/src/model/category.dart'; export 'package:openapi/src/model/class_model.dart'; export 'package:openapi/src/model/deprecated_object.dart'; export 'package:openapi/src/model/dog.dart'; -export 'package:openapi/src/model/dog_all_of.dart'; export 'package:openapi/src/model/enum_arrays.dart'; export 'package:openapi/src/model/enum_test.dart'; export 'package:openapi/src/model/fake_big_decimal_map200_response.dart'; diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/cat.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/cat.dart index 23d19b38b05..af1faeef25c 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/cat.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/cat.dart @@ -4,7 +4,6 @@ // ignore_for_file: unused_element import 'package:openapi/src/model/animal.dart'; -import 'package:openapi/src/model/cat_all_of.dart'; import 'package:built_value/built_value.dart'; import 'package:built_value/serializer.dart'; @@ -17,7 +16,10 @@ part 'cat.g.dart'; /// * [color] /// * [declawed] @BuiltValue() -abstract class Cat implements Animal, CatAllOf, Built { +abstract class Cat implements Animal, Built { + @BuiltValueField(wireName: r'declawed') + bool? get declawed; + Cat._(); factory Cat([void updates(CatBuilder b)]) = _$Cat; @@ -42,11 +44,6 @@ class _$CatSerializer implements PrimitiveSerializer { Cat object, { FullType specifiedType = FullType.unspecified, }) sync* { - yield r'className'; - yield serializers.serialize( - object.className, - specifiedType: const FullType(String), - ); if (object.color != null) { yield r'color'; yield serializers.serialize( @@ -61,6 +58,11 @@ class _$CatSerializer implements PrimitiveSerializer { specifiedType: const FullType(bool), ); } + yield r'className'; + yield serializers.serialize( + object.className, + specifiedType: const FullType(String), + ); } @override @@ -84,13 +86,6 @@ class _$CatSerializer implements PrimitiveSerializer { final key = serializedList[i] as String; final value = serializedList[i + 1]; switch (key) { - case r'className': - final valueDes = serializers.deserialize( - value, - specifiedType: const FullType(String), - ) as String; - result.className = valueDes; - break; case r'color': final valueDes = serializers.deserialize( value, @@ -105,6 +100,13 @@ class _$CatSerializer implements PrimitiveSerializer { ) as bool; result.declawed = valueDes; break; + case r'className': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.className = valueDes; + break; default: unhandled.add(key); unhandled.add(value); diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/cat_all_of.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/cat_all_of.dart deleted file mode 100644 index 02d9cce0cae..00000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/cat_all_of.dart +++ /dev/null @@ -1,141 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// - -// ignore_for_file: unused_element -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'cat_all_of.g.dart'; - -/// CatAllOf -/// -/// Properties: -/// * [declawed] -@BuiltValue(instantiable: false) -abstract class CatAllOf { - @BuiltValueField(wireName: r'declawed') - bool? get declawed; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$CatAllOfSerializer(); -} - -class _$CatAllOfSerializer implements PrimitiveSerializer { - @override - final Iterable types = const [CatAllOf]; - - @override - final String wireName = r'CatAllOf'; - - Iterable _serializeProperties( - Serializers serializers, - CatAllOf object, { - FullType specifiedType = FullType.unspecified, - }) sync* { - if (object.declawed != null) { - yield r'declawed'; - yield serializers.serialize( - object.declawed, - specifiedType: const FullType(bool), - ); - } - } - - @override - Object serialize( - Serializers serializers, - CatAllOf object, { - FullType specifiedType = FullType.unspecified, - }) { - return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); - } - - @override - CatAllOf deserialize( - Serializers serializers, - Object serialized, { - FullType specifiedType = FullType.unspecified, - }) { - return serializers.deserialize(serialized, specifiedType: FullType($CatAllOf)) as $CatAllOf; - } -} - -/// a concrete implementation of [CatAllOf], since [CatAllOf] is not instantiable -@BuiltValue(instantiable: true) -abstract class $CatAllOf implements CatAllOf, Built<$CatAllOf, $CatAllOfBuilder> { - $CatAllOf._(); - - factory $CatAllOf([void Function($CatAllOfBuilder)? updates]) = _$$CatAllOf; - - @BuiltValueHook(initializeBuilder: true) - static void _defaults($CatAllOfBuilder b) => b; - - @BuiltValueSerializer(custom: true) - static Serializer<$CatAllOf> get serializer => _$$CatAllOfSerializer(); -} - -class _$$CatAllOfSerializer implements PrimitiveSerializer<$CatAllOf> { - @override - final Iterable types = const [$CatAllOf, _$$CatAllOf]; - - @override - final String wireName = r'$CatAllOf'; - - @override - Object serialize( - Serializers serializers, - $CatAllOf object, { - FullType specifiedType = FullType.unspecified, - }) { - return serializers.serialize(object, specifiedType: FullType(CatAllOf))!; - } - - void _deserializeProperties( - Serializers serializers, - Object serialized, { - FullType specifiedType = FullType.unspecified, - required List serializedList, - required CatAllOfBuilder result, - required List unhandled, - }) { - for (var i = 0; i < serializedList.length; i += 2) { - final key = serializedList[i] as String; - final value = serializedList[i + 1]; - switch (key) { - case r'declawed': - final valueDes = serializers.deserialize( - value, - specifiedType: const FullType(bool), - ) as bool; - result.declawed = valueDes; - break; - default: - unhandled.add(key); - unhandled.add(value); - break; - } - } - } - - @override - $CatAllOf deserialize( - Serializers serializers, - Object serialized, { - FullType specifiedType = FullType.unspecified, - }) { - final result = $CatAllOfBuilder(); - final serializedList = (serialized as Iterable).toList(); - final unhandled = []; - _deserializeProperties( - serializers, - serialized, - specifiedType: specifiedType, - serializedList: serializedList, - unhandled: unhandled, - result: result, - ); - return result.build(); - } -} - diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/dog.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/dog.dart index 4d9974f25b1..8d3d3e27a17 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/dog.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/dog.dart @@ -3,7 +3,6 @@ // // ignore_for_file: unused_element -import 'package:openapi/src/model/dog_all_of.dart'; import 'package:openapi/src/model/animal.dart'; import 'package:built_value/built_value.dart'; import 'package:built_value/serializer.dart'; @@ -17,7 +16,10 @@ part 'dog.g.dart'; /// * [color] /// * [breed] @BuiltValue() -abstract class Dog implements Animal, DogAllOf, Built { +abstract class Dog implements Animal, Built { + @BuiltValueField(wireName: r'breed') + String? get breed; + Dog._(); factory Dog([void updates(DogBuilder b)]) = _$Dog; @@ -42,11 +44,6 @@ class _$DogSerializer implements PrimitiveSerializer { Dog object, { FullType specifiedType = FullType.unspecified, }) sync* { - yield r'className'; - yield serializers.serialize( - object.className, - specifiedType: const FullType(String), - ); if (object.color != null) { yield r'color'; yield serializers.serialize( @@ -61,6 +58,11 @@ class _$DogSerializer implements PrimitiveSerializer { specifiedType: const FullType(String), ); } + yield r'className'; + yield serializers.serialize( + object.className, + specifiedType: const FullType(String), + ); } @override @@ -84,13 +86,6 @@ class _$DogSerializer implements PrimitiveSerializer { final key = serializedList[i] as String; final value = serializedList[i + 1]; switch (key) { - case r'className': - final valueDes = serializers.deserialize( - value, - specifiedType: const FullType(String), - ) as String; - result.className = valueDes; - break; case r'color': final valueDes = serializers.deserialize( value, @@ -105,6 +100,13 @@ class _$DogSerializer implements PrimitiveSerializer { ) as String; result.breed = valueDes; break; + case r'className': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.className = valueDes; + break; default: unhandled.add(key); unhandled.add(value); diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/dog_all_of.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/dog_all_of.dart deleted file mode 100644 index bd52567fa60..00000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/dog_all_of.dart +++ /dev/null @@ -1,141 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// - -// ignore_for_file: unused_element -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'dog_all_of.g.dart'; - -/// DogAllOf -/// -/// Properties: -/// * [breed] -@BuiltValue(instantiable: false) -abstract class DogAllOf { - @BuiltValueField(wireName: r'breed') - String? get breed; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$DogAllOfSerializer(); -} - -class _$DogAllOfSerializer implements PrimitiveSerializer { - @override - final Iterable types = const [DogAllOf]; - - @override - final String wireName = r'DogAllOf'; - - Iterable _serializeProperties( - Serializers serializers, - DogAllOf object, { - FullType specifiedType = FullType.unspecified, - }) sync* { - if (object.breed != null) { - yield r'breed'; - yield serializers.serialize( - object.breed, - specifiedType: const FullType(String), - ); - } - } - - @override - Object serialize( - Serializers serializers, - DogAllOf object, { - FullType specifiedType = FullType.unspecified, - }) { - return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); - } - - @override - DogAllOf deserialize( - Serializers serializers, - Object serialized, { - FullType specifiedType = FullType.unspecified, - }) { - return serializers.deserialize(serialized, specifiedType: FullType($DogAllOf)) as $DogAllOf; - } -} - -/// a concrete implementation of [DogAllOf], since [DogAllOf] is not instantiable -@BuiltValue(instantiable: true) -abstract class $DogAllOf implements DogAllOf, Built<$DogAllOf, $DogAllOfBuilder> { - $DogAllOf._(); - - factory $DogAllOf([void Function($DogAllOfBuilder)? updates]) = _$$DogAllOf; - - @BuiltValueHook(initializeBuilder: true) - static void _defaults($DogAllOfBuilder b) => b; - - @BuiltValueSerializer(custom: true) - static Serializer<$DogAllOf> get serializer => _$$DogAllOfSerializer(); -} - -class _$$DogAllOfSerializer implements PrimitiveSerializer<$DogAllOf> { - @override - final Iterable types = const [$DogAllOf, _$$DogAllOf]; - - @override - final String wireName = r'$DogAllOf'; - - @override - Object serialize( - Serializers serializers, - $DogAllOf object, { - FullType specifiedType = FullType.unspecified, - }) { - return serializers.serialize(object, specifiedType: FullType(DogAllOf))!; - } - - void _deserializeProperties( - Serializers serializers, - Object serialized, { - FullType specifiedType = FullType.unspecified, - required List serializedList, - required DogAllOfBuilder result, - required List unhandled, - }) { - for (var i = 0; i < serializedList.length; i += 2) { - final key = serializedList[i] as String; - final value = serializedList[i + 1]; - switch (key) { - case r'breed': - final valueDes = serializers.deserialize( - value, - specifiedType: const FullType(String), - ) as String; - result.breed = valueDes; - break; - default: - unhandled.add(key); - unhandled.add(value); - break; - } - } - } - - @override - $DogAllOf deserialize( - Serializers serializers, - Object serialized, { - FullType specifiedType = FullType.unspecified, - }) { - final result = $DogAllOfBuilder(); - final serializedList = (serialized as Iterable).toList(); - final unhandled = []; - _deserializeProperties( - serializers, - serialized, - specifiedType: specifiedType, - serializedList: serializedList, - unhandled: unhandled, - result: result, - ); - return result.build(); - } -} - diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/serializers.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/serializers.dart index e5f47e49c2c..ca163ddac10 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/serializers.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/serializers.dart @@ -23,12 +23,10 @@ import 'package:openapi/src/model/array_of_number_only.dart'; import 'package:openapi/src/model/array_test.dart'; import 'package:openapi/src/model/capitalization.dart'; import 'package:openapi/src/model/cat.dart'; -import 'package:openapi/src/model/cat_all_of.dart'; import 'package:openapi/src/model/category.dart'; import 'package:openapi/src/model/class_model.dart'; import 'package:openapi/src/model/deprecated_object.dart'; import 'package:openapi/src/model/dog.dart'; -import 'package:openapi/src/model/dog_all_of.dart'; import 'package:openapi/src/model/enum_arrays.dart'; import 'package:openapi/src/model/enum_test.dart'; import 'package:openapi/src/model/fake_big_decimal_map200_response.dart'; @@ -76,12 +74,10 @@ part 'serializers.g.dart'; ArrayTest, Capitalization, Cat, - CatAllOf,$CatAllOf, Category, ClassModel, DeprecatedObject, Dog, - DogAllOf,$DogAllOf, EnumArrays, EnumTest, FakeBigDecimalMap200Response, @@ -151,8 +147,6 @@ Serializers serializers = (_$serializers.toBuilder() () => ListBuilder(), ) ..add(Animal.serializer) - ..add(CatAllOf.serializer) - ..add(DogAllOf.serializer) ..add(const OneOfSerializer()) ..add(const AnyOfSerializer()) ..add(const DateSerializer()) diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/cat_all_of_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/cat_all_of_test.dart deleted file mode 100644 index fb7e999bf8d..00000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/cat_all_of_test.dart +++ /dev/null @@ -1,16 +0,0 @@ -import 'package:test/test.dart'; -import 'package:openapi/openapi.dart'; - -// tests for CatAllOf -void main() { - //final instance = CatAllOfBuilder(); - // TODO add properties to the builder and call build() - - group(CatAllOf, () { - // bool declawed - test('to test the property `declawed`', () async { - // TODO - }); - - }); -} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/dog_all_of_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/dog_all_of_test.dart deleted file mode 100644 index 7b4f4095dc9..00000000000 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/dog_all_of_test.dart +++ /dev/null @@ -1,16 +0,0 @@ -import 'package:test/test.dart'; -import 'package:openapi/openapi.dart'; - -// tests for DogAllOf -void main() { - //final instance = DogAllOfBuilder(); - // TODO add properties to the builder and call build() - - group(DogAllOf, () { - // String breed - test('to test the property `breed`', () async { - // TODO - }); - - }); -} diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/.openapi-generator/FILES b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/.openapi-generator/FILES index d03b9189b7f..727a5ef352b 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/.openapi-generator/FILES +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/.openapi-generator/FILES @@ -12,13 +12,11 @@ doc/ArrayOfNumberOnly.md doc/ArrayTest.md doc/Capitalization.md doc/Cat.md -doc/CatAllOf.md doc/Category.md doc/ClassModel.md doc/DefaultApi.md doc/DeprecatedObject.md doc/Dog.md -doc/DogAllOf.md doc/EnumArrays.md doc/EnumClass.md doc/EnumTest.md @@ -84,12 +82,10 @@ lib/model/array_of_number_only.dart lib/model/array_test.dart lib/model/capitalization.dart lib/model/cat.dart -lib/model/cat_all_of.dart lib/model/category.dart lib/model/class_model.dart lib/model/deprecated_object.dart lib/model/dog.dart -lib/model/dog_all_of.dart lib/model/enum_arrays.dart lib/model/enum_class.dart lib/model/enum_test.dart diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/README.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/README.md index bb9950444ab..940295f3df9 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/README.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/README.md @@ -113,12 +113,10 @@ Class | Method | HTTP request | Description - [ArrayTest](doc//ArrayTest.md) - [Capitalization](doc//Capitalization.md) - [Cat](doc//Cat.md) - - [CatAllOf](doc//CatAllOf.md) - [Category](doc//Category.md) - [ClassModel](doc//ClassModel.md) - [DeprecatedObject](doc//DeprecatedObject.md) - [Dog](doc//Dog.md) - - [DogAllOf](doc//DogAllOf.md) - [EnumArrays](doc//EnumArrays.md) - [EnumClass](doc//EnumClass.md) - [EnumTest](doc//EnumTest.md) diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/CatAllOf.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/CatAllOf.md deleted file mode 100644 index 36b2ae0e8ab..00000000000 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/CatAllOf.md +++ /dev/null @@ -1,15 +0,0 @@ -# openapi.model.CatAllOf - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**declawed** | **bool** | | [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/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/DogAllOf.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/DogAllOf.md deleted file mode 100644 index 97a7c8fba49..00000000000 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/DogAllOf.md +++ /dev/null @@ -1,15 +0,0 @@ -# openapi.model.DogAllOf - -## Load the model package -```dart -import 'package:openapi/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**breed** | **String** | | [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/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api.dart index 92805161556..78bbb5b3f0d 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api.dart @@ -44,12 +44,10 @@ part 'model/array_of_number_only.dart'; part 'model/array_test.dart'; part 'model/capitalization.dart'; part 'model/cat.dart'; -part 'model/cat_all_of.dart'; part 'model/category.dart'; part 'model/class_model.dart'; part 'model/deprecated_object.dart'; part 'model/dog.dart'; -part 'model/dog_all_of.dart'; part 'model/enum_arrays.dart'; part 'model/enum_class.dart'; part 'model/enum_test.dart'; diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api_client.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api_client.dart index 729af42b686..4a50876c56e 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api_client.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api_client.dart @@ -199,8 +199,6 @@ class ApiClient { return Capitalization.fromJson(value); case 'Cat': return Cat.fromJson(value); - case 'CatAllOf': - return CatAllOf.fromJson(value); case 'Category': return Category.fromJson(value); case 'ClassModel': @@ -209,8 +207,6 @@ class ApiClient { return DeprecatedObject.fromJson(value); case 'Dog': return Dog.fromJson(value); - case 'DogAllOf': - return DogAllOf.fromJson(value); case 'EnumArrays': return EnumArrays.fromJson(value); case 'EnumClass': diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/cat_all_of.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/cat_all_of.dart deleted file mode 100644 index 9d090b4068a..00000000000 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/cat_all_of.dart +++ /dev/null @@ -1,118 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.12 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class CatAllOf { - /// Returns a new [CatAllOf] instance. - CatAllOf({ - this.declawed, - }); - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - bool? declawed; - - @override - bool operator ==(Object other) => identical(this, other) || other is CatAllOf && - other.declawed == declawed; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (declawed == null ? 0 : declawed!.hashCode); - - @override - String toString() => 'CatAllOf[declawed=$declawed]'; - - Map toJson() { - final json = {}; - if (this.declawed != null) { - json[r'declawed'] = this.declawed; - } else { - json[r'declawed'] = null; - } - return json; - } - - /// Returns a new [CatAllOf] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static CatAllOf? fromJson(dynamic value) { - if (value is Map) { - final json = value.cast(); - - // Ensure that the map contains the required keys. - // Note 1: the values aren't checked for validity beyond being non-null. - // Note 2: this code is stripped in release mode! - assert(() { - requiredKeys.forEach((key) { - assert(json.containsKey(key), 'Required key "CatAllOf[$key]" is missing from JSON.'); - assert(json[key] != null, 'Required key "CatAllOf[$key]" has a null value in JSON.'); - }); - return true; - }()); - - return CatAllOf( - declawed: mapValueOfType(json, r'declawed'), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = CatAllOf.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = CatAllOf.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of CatAllOf-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = CatAllOf.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/dog_all_of.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/dog_all_of.dart deleted file mode 100644 index 5398d4b03fd..00000000000 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/dog_all_of.dart +++ /dev/null @@ -1,118 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.12 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class DogAllOf { - /// Returns a new [DogAllOf] instance. - DogAllOf({ - this.breed, - }); - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - String? breed; - - @override - bool operator ==(Object other) => identical(this, other) || other is DogAllOf && - other.breed == breed; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (breed == null ? 0 : breed!.hashCode); - - @override - String toString() => 'DogAllOf[breed=$breed]'; - - Map toJson() { - final json = {}; - if (this.breed != null) { - json[r'breed'] = this.breed; - } else { - json[r'breed'] = null; - } - return json; - } - - /// Returns a new [DogAllOf] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static DogAllOf? fromJson(dynamic value) { - if (value is Map) { - final json = value.cast(); - - // Ensure that the map contains the required keys. - // Note 1: the values aren't checked for validity beyond being non-null. - // Note 2: this code is stripped in release mode! - assert(() { - requiredKeys.forEach((key) { - assert(json.containsKey(key), 'Required key "DogAllOf[$key]" is missing from JSON.'); - assert(json[key] != null, 'Required key "DogAllOf[$key]" has a null value in JSON.'); - }); - return true; - }()); - - return DogAllOf( - breed: mapValueOfType(json, r'breed'), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = DogAllOf.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = DogAllOf.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of DogAllOf-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = DogAllOf.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/all_of_with_single_ref_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/all_of_with_single_ref_test.dart index 0005229b9ed..8fbbec42ef1 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/all_of_with_single_ref_test.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/all_of_with_single_ref_test.dart @@ -21,7 +21,7 @@ void main() { // TODO }); - // AllOfWithSingleRefSingleRefType singleRefType + // SingleRefType singleRefType test('to test the property `singleRefType`', () async { // TODO }); diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/cat_all_of_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/cat_all_of_test.dart deleted file mode 100644 index 018a5e89ce1..00000000000 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/cat_all_of_test.dart +++ /dev/null @@ -1,28 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.12 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -import 'package:openapi/api.dart'; -import 'package:test/test.dart'; - -// these tests are not regenerated by dart 2 generator as they break compatibility with Dart versions under 2.12 -// tests for CatAllOf -void main() { - // final instance = CatAllOf(); - - group('test CatAllOf', () { - // bool declawed - test('to test the property `declawed`', () async { - // TODO - }); - - - }); - -} diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/dog_all_of_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/dog_all_of_test.dart deleted file mode 100644 index 85b1bbc460a..00000000000 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/dog_all_of_test.dart +++ /dev/null @@ -1,28 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.12 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -import 'package:openapi/api.dart'; -import 'package:test/test.dart'; - -// these tests are not regenerated by dart 2 generator as they break compatibility with Dart versions under 2.12 -// tests for DogAllOf -void main() { - // final instance = DogAllOf(); - - group('test DogAllOf', () { - // String breed - test('to test the property `breed`', () async { - // TODO - }); - - - }); - -} diff --git a/samples/openapi3/client/petstore/go/go-petstore/.openapi-generator/FILES b/samples/openapi3/client/petstore/go/go-petstore/.openapi-generator/FILES index 9b838cbcf2f..f4c5050f658 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/.openapi-generator/FILES +++ b/samples/openapi3/client/petstore/go/go-petstore/.openapi-generator/FILES @@ -13,7 +13,6 @@ client.go configuration.go docs/AdditionalPropertiesClass.md docs/AllOfPrimitiveTypes.md -docs/AllOfPrimitiveTypesAllOf.md docs/Animal.md docs/AnotherFakeAPI.md docs/ApiResponse.md @@ -26,15 +25,12 @@ docs/Banana.md docs/BananaReq.md docs/Capitalization.md docs/Cat.md -docs/CatAllOf.md docs/Category.md docs/ClassModel.md docs/Client.md docs/DefaultAPI.md docs/Dog.md -docs/DogAllOf.md docs/DuplicatedPropChild.md -docs/DuplicatedPropChildAllOf.md docs/DuplicatedPropParent.md docs/EnumArrays.md docs/EnumClass.md @@ -91,7 +87,6 @@ model__foo_get_default_response.go model__special_model_name_.go model_additional_properties_class.go model_all_of_primitive_types.go -model_all_of_primitive_types_all_of.go model_animal.go model_api_response.go model_apple.go @@ -103,14 +98,11 @@ model_banana.go model_banana_req.go model_capitalization.go model_cat.go -model_cat_all_of.go model_category.go model_class_model.go model_client.go model_dog.go -model_dog_all_of.go model_duplicated_prop_child.go -model_duplicated_prop_child_all_of.go model_duplicated_prop_parent.go model_enum_arrays.go model_enum_class.go diff --git a/samples/openapi3/client/petstore/go/go-petstore/README.md b/samples/openapi3/client/petstore/go/go-petstore/README.md index 52e28ed4862..d45ef31cf53 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/README.md +++ b/samples/openapi3/client/petstore/go/go-petstore/README.md @@ -124,7 +124,6 @@ Class | Method | HTTP request | Description - [AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md) - [AllOfPrimitiveTypes](docs/AllOfPrimitiveTypes.md) - - [AllOfPrimitiveTypesAllOf](docs/AllOfPrimitiveTypesAllOf.md) - [Animal](docs/Animal.md) - [ApiResponse](docs/ApiResponse.md) - [Apple](docs/Apple.md) @@ -136,14 +135,11 @@ Class | Method | HTTP request | Description - [BananaReq](docs/BananaReq.md) - [Capitalization](docs/Capitalization.md) - [Cat](docs/Cat.md) - - [CatAllOf](docs/CatAllOf.md) - [Category](docs/Category.md) - [ClassModel](docs/ClassModel.md) - [Client](docs/Client.md) - [Dog](docs/Dog.md) - - [DogAllOf](docs/DogAllOf.md) - [DuplicatedPropChild](docs/DuplicatedPropChild.md) - - [DuplicatedPropChildAllOf](docs/DuplicatedPropChildAllOf.md) - [DuplicatedPropParent](docs/DuplicatedPropParent.md) - [EnumArrays](docs/EnumArrays.md) - [EnumClass](docs/EnumClass.md) diff --git a/samples/openapi3/client/petstore/go/go-petstore/api/openapi.yaml b/samples/openapi3/client/petstore/go/go-petstore/api/openapi.yaml index 37418ea8370..d65fa8fa4a9 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/api/openapi.yaml +++ b/samples/openapi3/client/petstore/go/go-petstore/api/openapi.yaml @@ -1409,12 +1409,18 @@ components: Dog: allOf: - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Dog_allOf' + - properties: + breed: + type: string + type: object Cat: allOf: - $ref: '#/components/schemas/Animal' - $ref: '#/components/schemas/Address' - - $ref: '#/components/schemas/Cat_allOf' + - properties: + declawed: + type: boolean + type: object Address: additionalProperties: type: integer @@ -1987,7 +1993,11 @@ components: DuplicatedPropChild: allOf: - $ref: '#/components/schemas/DuplicatedPropParent' - - $ref: '#/components/schemas/DuplicatedPropChild_allOf' + - properties: + dup-prop: + description: A discriminator value + type: string + type: object DuplicatedPropParent: description: parent model with duplicated property discriminator: @@ -2016,7 +2026,11 @@ components: type: string AllOfPrimitiveTypes: allOf: - - $ref: '#/components/schemas/AllOfPrimitiveTypes_allOf' + - properties: + test: + format: date-time + type: string + type: object _foo_get_default_response: example: string: @@ -2160,32 +2174,6 @@ components: required: - requiredFile type: object - Dog_allOf: - properties: - breed: - type: string - type: object - example: null - Cat_allOf: - properties: - declawed: - type: boolean - type: object - example: null - DuplicatedPropChild_allOf: - properties: - dup-prop: - description: A discriminator value - type: string - type: object - example: null - AllOfPrimitiveTypes_allOf: - properties: - test: - format: date-time - type: string - type: object - example: null securitySchemes: petstore_auth: flows: diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/AllOfPrimitiveTypesAllOf.md b/samples/openapi3/client/petstore/go/go-petstore/docs/AllOfPrimitiveTypesAllOf.md deleted file mode 100644 index 498e63a8438..00000000000 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/AllOfPrimitiveTypesAllOf.md +++ /dev/null @@ -1,56 +0,0 @@ -# AllOfPrimitiveTypesAllOf - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Test** | Pointer to **time.Time** | | [optional] - -## Methods - -### NewAllOfPrimitiveTypesAllOf - -`func NewAllOfPrimitiveTypesAllOf() *AllOfPrimitiveTypesAllOf` - -NewAllOfPrimitiveTypesAllOf instantiates a new AllOfPrimitiveTypesAllOf object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewAllOfPrimitiveTypesAllOfWithDefaults - -`func NewAllOfPrimitiveTypesAllOfWithDefaults() *AllOfPrimitiveTypesAllOf` - -NewAllOfPrimitiveTypesAllOfWithDefaults instantiates a new AllOfPrimitiveTypesAllOf object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetTest - -`func (o *AllOfPrimitiveTypesAllOf) GetTest() time.Time` - -GetTest returns the Test field if non-nil, zero value otherwise. - -### GetTestOk - -`func (o *AllOfPrimitiveTypesAllOf) GetTestOk() (*time.Time, bool)` - -GetTestOk returns a tuple with the Test field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetTest - -`func (o *AllOfPrimitiveTypesAllOf) SetTest(v time.Time)` - -SetTest sets Test field to given value. - -### HasTest - -`func (o *AllOfPrimitiveTypesAllOf) HasTest() bool` - -HasTest returns a boolean if a field has been set. - - -[[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/openapi3/client/petstore/go/go-petstore/docs/CatAllOf.md b/samples/openapi3/client/petstore/go/go-petstore/docs/CatAllOf.md deleted file mode 100644 index be0cc6c8519..00000000000 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/CatAllOf.md +++ /dev/null @@ -1,56 +0,0 @@ -# CatAllOf - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Declawed** | Pointer to **bool** | | [optional] - -## Methods - -### NewCatAllOf - -`func NewCatAllOf() *CatAllOf` - -NewCatAllOf instantiates a new CatAllOf object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewCatAllOfWithDefaults - -`func NewCatAllOfWithDefaults() *CatAllOf` - -NewCatAllOfWithDefaults instantiates a new CatAllOf object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetDeclawed - -`func (o *CatAllOf) GetDeclawed() bool` - -GetDeclawed returns the Declawed field if non-nil, zero value otherwise. - -### GetDeclawedOk - -`func (o *CatAllOf) GetDeclawedOk() (*bool, bool)` - -GetDeclawedOk returns a tuple with the Declawed field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDeclawed - -`func (o *CatAllOf) SetDeclawed(v bool)` - -SetDeclawed sets Declawed field to given value. - -### HasDeclawed - -`func (o *CatAllOf) HasDeclawed() bool` - -HasDeclawed returns a boolean if a field has been set. - - -[[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/openapi3/client/petstore/go/go-petstore/docs/DogAllOf.md b/samples/openapi3/client/petstore/go/go-petstore/docs/DogAllOf.md deleted file mode 100644 index 3ed4dfa5ea2..00000000000 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/DogAllOf.md +++ /dev/null @@ -1,56 +0,0 @@ -# DogAllOf - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Breed** | Pointer to **string** | | [optional] - -## Methods - -### NewDogAllOf - -`func NewDogAllOf() *DogAllOf` - -NewDogAllOf instantiates a new DogAllOf object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewDogAllOfWithDefaults - -`func NewDogAllOfWithDefaults() *DogAllOf` - -NewDogAllOfWithDefaults instantiates a new DogAllOf object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetBreed - -`func (o *DogAllOf) GetBreed() string` - -GetBreed returns the Breed field if non-nil, zero value otherwise. - -### GetBreedOk - -`func (o *DogAllOf) GetBreedOk() (*string, bool)` - -GetBreedOk returns a tuple with the Breed field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetBreed - -`func (o *DogAllOf) SetBreed(v string)` - -SetBreed sets Breed field to given value. - -### HasBreed - -`func (o *DogAllOf) HasBreed() bool` - -HasBreed returns a boolean if a field has been set. - - -[[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/openapi3/client/petstore/go/go-petstore/docs/DuplicatedPropChildAllOf.md b/samples/openapi3/client/petstore/go/go-petstore/docs/DuplicatedPropChildAllOf.md deleted file mode 100644 index 8f5f1c7cd51..00000000000 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/DuplicatedPropChildAllOf.md +++ /dev/null @@ -1,56 +0,0 @@ -# DuplicatedPropChildAllOf - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**DupProp** | Pointer to **string** | A discriminator value | [optional] - -## Methods - -### NewDuplicatedPropChildAllOf - -`func NewDuplicatedPropChildAllOf() *DuplicatedPropChildAllOf` - -NewDuplicatedPropChildAllOf instantiates a new DuplicatedPropChildAllOf object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewDuplicatedPropChildAllOfWithDefaults - -`func NewDuplicatedPropChildAllOfWithDefaults() *DuplicatedPropChildAllOf` - -NewDuplicatedPropChildAllOfWithDefaults instantiates a new DuplicatedPropChildAllOf object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetDupProp - -`func (o *DuplicatedPropChildAllOf) GetDupProp() string` - -GetDupProp returns the DupProp field if non-nil, zero value otherwise. - -### GetDupPropOk - -`func (o *DuplicatedPropChildAllOf) GetDupPropOk() (*string, bool)` - -GetDupPropOk returns a tuple with the DupProp field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDupProp - -`func (o *DuplicatedPropChildAllOf) SetDupProp(v string)` - -SetDupProp sets DupProp field to given value. - -### HasDupProp - -`func (o *DuplicatedPropChildAllOf) HasDupProp() bool` - -HasDupProp returns a boolean if a field has been set. - - -[[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/openapi3/client/petstore/go/go-petstore/model_all_of_primitive_types_all_of.go b/samples/openapi3/client/petstore/go/go-petstore/model_all_of_primitive_types_all_of.go deleted file mode 100644 index 1648becad66..00000000000 --- a/samples/openapi3/client/petstore/go/go-petstore/model_all_of_primitive_types_all_of.go +++ /dev/null @@ -1,152 +0,0 @@ -/* -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: \" \\ - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package petstore - -import ( - "encoding/json" - "time" -) - -// checks if the AllOfPrimitiveTypesAllOf type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &AllOfPrimitiveTypesAllOf{} - -// AllOfPrimitiveTypesAllOf struct for AllOfPrimitiveTypesAllOf -type AllOfPrimitiveTypesAllOf struct { - Test *time.Time `json:"test,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _AllOfPrimitiveTypesAllOf AllOfPrimitiveTypesAllOf - -// NewAllOfPrimitiveTypesAllOf instantiates a new AllOfPrimitiveTypesAllOf object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewAllOfPrimitiveTypesAllOf() *AllOfPrimitiveTypesAllOf { - this := AllOfPrimitiveTypesAllOf{} - return &this -} - -// NewAllOfPrimitiveTypesAllOfWithDefaults instantiates a new AllOfPrimitiveTypesAllOf object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewAllOfPrimitiveTypesAllOfWithDefaults() *AllOfPrimitiveTypesAllOf { - this := AllOfPrimitiveTypesAllOf{} - return &this -} - -// GetTest returns the Test field value if set, zero value otherwise. -func (o *AllOfPrimitiveTypesAllOf) GetTest() time.Time { - if o == nil || IsNil(o.Test) { - var ret time.Time - return ret - } - return *o.Test -} - -// GetTestOk returns a tuple with the Test field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AllOfPrimitiveTypesAllOf) GetTestOk() (*time.Time, bool) { - if o == nil || IsNil(o.Test) { - return nil, false - } - return o.Test, true -} - -// HasTest returns a boolean if a field has been set. -func (o *AllOfPrimitiveTypesAllOf) HasTest() bool { - if o != nil && !IsNil(o.Test) { - return true - } - - return false -} - -// SetTest gets a reference to the given time.Time and assigns it to the Test field. -func (o *AllOfPrimitiveTypesAllOf) SetTest(v time.Time) { - o.Test = &v -} - -func (o AllOfPrimitiveTypesAllOf) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o AllOfPrimitiveTypesAllOf) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Test) { - toSerialize["test"] = o.Test - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *AllOfPrimitiveTypesAllOf) UnmarshalJSON(bytes []byte) (err error) { - varAllOfPrimitiveTypesAllOf := _AllOfPrimitiveTypesAllOf{} - - if err = json.Unmarshal(bytes, &varAllOfPrimitiveTypesAllOf); err == nil { - *o = AllOfPrimitiveTypesAllOf(varAllOfPrimitiveTypesAllOf) - } - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { - delete(additionalProperties, "test") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableAllOfPrimitiveTypesAllOf struct { - value *AllOfPrimitiveTypesAllOf - isSet bool -} - -func (v NullableAllOfPrimitiveTypesAllOf) Get() *AllOfPrimitiveTypesAllOf { - return v.value -} - -func (v *NullableAllOfPrimitiveTypesAllOf) Set(val *AllOfPrimitiveTypesAllOf) { - v.value = val - v.isSet = true -} - -func (v NullableAllOfPrimitiveTypesAllOf) IsSet() bool { - return v.isSet -} - -func (v *NullableAllOfPrimitiveTypesAllOf) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableAllOfPrimitiveTypesAllOf(val *AllOfPrimitiveTypesAllOf) *NullableAllOfPrimitiveTypesAllOf { - return &NullableAllOfPrimitiveTypesAllOf{value: val, isSet: true} -} - -func (v NullableAllOfPrimitiveTypesAllOf) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableAllOfPrimitiveTypesAllOf) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_cat_all_of.go b/samples/openapi3/client/petstore/go/go-petstore/model_cat_all_of.go deleted file mode 100644 index 4d6bd3ebb3b..00000000000 --- a/samples/openapi3/client/petstore/go/go-petstore/model_cat_all_of.go +++ /dev/null @@ -1,151 +0,0 @@ -/* -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: \" \\ - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package petstore - -import ( - "encoding/json" -) - -// checks if the CatAllOf type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CatAllOf{} - -// CatAllOf struct for CatAllOf -type CatAllOf struct { - Declawed *bool `json:"declawed,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _CatAllOf CatAllOf - -// NewCatAllOf instantiates a new CatAllOf object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewCatAllOf() *CatAllOf { - this := CatAllOf{} - return &this -} - -// NewCatAllOfWithDefaults instantiates a new CatAllOf object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewCatAllOfWithDefaults() *CatAllOf { - this := CatAllOf{} - return &this -} - -// GetDeclawed returns the Declawed field value if set, zero value otherwise. -func (o *CatAllOf) GetDeclawed() bool { - if o == nil || IsNil(o.Declawed) { - var ret bool - return ret - } - return *o.Declawed -} - -// GetDeclawedOk returns a tuple with the Declawed field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CatAllOf) GetDeclawedOk() (*bool, bool) { - if o == nil || IsNil(o.Declawed) { - return nil, false - } - return o.Declawed, true -} - -// HasDeclawed returns a boolean if a field has been set. -func (o *CatAllOf) HasDeclawed() bool { - if o != nil && !IsNil(o.Declawed) { - return true - } - - return false -} - -// SetDeclawed gets a reference to the given bool and assigns it to the Declawed field. -func (o *CatAllOf) SetDeclawed(v bool) { - o.Declawed = &v -} - -func (o CatAllOf) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o CatAllOf) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Declawed) { - toSerialize["declawed"] = o.Declawed - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *CatAllOf) UnmarshalJSON(bytes []byte) (err error) { - varCatAllOf := _CatAllOf{} - - if err = json.Unmarshal(bytes, &varCatAllOf); err == nil { - *o = CatAllOf(varCatAllOf) - } - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { - delete(additionalProperties, "declawed") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableCatAllOf struct { - value *CatAllOf - isSet bool -} - -func (v NullableCatAllOf) Get() *CatAllOf { - return v.value -} - -func (v *NullableCatAllOf) Set(val *CatAllOf) { - v.value = val - v.isSet = true -} - -func (v NullableCatAllOf) IsSet() bool { - return v.isSet -} - -func (v *NullableCatAllOf) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCatAllOf(val *CatAllOf) *NullableCatAllOf { - return &NullableCatAllOf{value: val, isSet: true} -} - -func (v NullableCatAllOf) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCatAllOf) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_dog_all_of.go b/samples/openapi3/client/petstore/go/go-petstore/model_dog_all_of.go deleted file mode 100644 index 29cced67f6d..00000000000 --- a/samples/openapi3/client/petstore/go/go-petstore/model_dog_all_of.go +++ /dev/null @@ -1,151 +0,0 @@ -/* -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: \" \\ - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package petstore - -import ( - "encoding/json" -) - -// checks if the DogAllOf type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &DogAllOf{} - -// DogAllOf struct for DogAllOf -type DogAllOf struct { - Breed *string `json:"breed,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _DogAllOf DogAllOf - -// NewDogAllOf instantiates a new DogAllOf object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewDogAllOf() *DogAllOf { - this := DogAllOf{} - return &this -} - -// NewDogAllOfWithDefaults instantiates a new DogAllOf object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewDogAllOfWithDefaults() *DogAllOf { - this := DogAllOf{} - return &this -} - -// GetBreed returns the Breed field value if set, zero value otherwise. -func (o *DogAllOf) GetBreed() string { - if o == nil || IsNil(o.Breed) { - var ret string - return ret - } - return *o.Breed -} - -// GetBreedOk returns a tuple with the Breed field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *DogAllOf) GetBreedOk() (*string, bool) { - if o == nil || IsNil(o.Breed) { - return nil, false - } - return o.Breed, true -} - -// HasBreed returns a boolean if a field has been set. -func (o *DogAllOf) HasBreed() bool { - if o != nil && !IsNil(o.Breed) { - return true - } - - return false -} - -// SetBreed gets a reference to the given string and assigns it to the Breed field. -func (o *DogAllOf) SetBreed(v string) { - o.Breed = &v -} - -func (o DogAllOf) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o DogAllOf) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Breed) { - toSerialize["breed"] = o.Breed - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *DogAllOf) UnmarshalJSON(bytes []byte) (err error) { - varDogAllOf := _DogAllOf{} - - if err = json.Unmarshal(bytes, &varDogAllOf); err == nil { - *o = DogAllOf(varDogAllOf) - } - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { - delete(additionalProperties, "breed") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableDogAllOf struct { - value *DogAllOf - isSet bool -} - -func (v NullableDogAllOf) Get() *DogAllOf { - return v.value -} - -func (v *NullableDogAllOf) Set(val *DogAllOf) { - v.value = val - v.isSet = true -} - -func (v NullableDogAllOf) IsSet() bool { - return v.isSet -} - -func (v *NullableDogAllOf) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableDogAllOf(val *DogAllOf) *NullableDogAllOf { - return &NullableDogAllOf{value: val, isSet: true} -} - -func (v NullableDogAllOf) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableDogAllOf) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_duplicated_prop_child_all_of.go b/samples/openapi3/client/petstore/go/go-petstore/model_duplicated_prop_child_all_of.go deleted file mode 100644 index 615eabe4ce3..00000000000 --- a/samples/openapi3/client/petstore/go/go-petstore/model_duplicated_prop_child_all_of.go +++ /dev/null @@ -1,152 +0,0 @@ -/* -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: \" \\ - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package petstore - -import ( - "encoding/json" -) - -// checks if the DuplicatedPropChildAllOf type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &DuplicatedPropChildAllOf{} - -// DuplicatedPropChildAllOf struct for DuplicatedPropChildAllOf -type DuplicatedPropChildAllOf struct { - // A discriminator value - DupProp *string `json:"dup-prop,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _DuplicatedPropChildAllOf DuplicatedPropChildAllOf - -// NewDuplicatedPropChildAllOf instantiates a new DuplicatedPropChildAllOf object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewDuplicatedPropChildAllOf() *DuplicatedPropChildAllOf { - this := DuplicatedPropChildAllOf{} - return &this -} - -// NewDuplicatedPropChildAllOfWithDefaults instantiates a new DuplicatedPropChildAllOf object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewDuplicatedPropChildAllOfWithDefaults() *DuplicatedPropChildAllOf { - this := DuplicatedPropChildAllOf{} - return &this -} - -// GetDupProp returns the DupProp field value if set, zero value otherwise. -func (o *DuplicatedPropChildAllOf) GetDupProp() string { - if o == nil || IsNil(o.DupProp) { - var ret string - return ret - } - return *o.DupProp -} - -// GetDupPropOk returns a tuple with the DupProp field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *DuplicatedPropChildAllOf) GetDupPropOk() (*string, bool) { - if o == nil || IsNil(o.DupProp) { - return nil, false - } - return o.DupProp, true -} - -// HasDupProp returns a boolean if a field has been set. -func (o *DuplicatedPropChildAllOf) HasDupProp() bool { - if o != nil && !IsNil(o.DupProp) { - return true - } - - return false -} - -// SetDupProp gets a reference to the given string and assigns it to the DupProp field. -func (o *DuplicatedPropChildAllOf) SetDupProp(v string) { - o.DupProp = &v -} - -func (o DuplicatedPropChildAllOf) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o DuplicatedPropChildAllOf) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.DupProp) { - toSerialize["dup-prop"] = o.DupProp - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *DuplicatedPropChildAllOf) UnmarshalJSON(bytes []byte) (err error) { - varDuplicatedPropChildAllOf := _DuplicatedPropChildAllOf{} - - if err = json.Unmarshal(bytes, &varDuplicatedPropChildAllOf); err == nil { - *o = DuplicatedPropChildAllOf(varDuplicatedPropChildAllOf) - } - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { - delete(additionalProperties, "dup-prop") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableDuplicatedPropChildAllOf struct { - value *DuplicatedPropChildAllOf - isSet bool -} - -func (v NullableDuplicatedPropChildAllOf) Get() *DuplicatedPropChildAllOf { - return v.value -} - -func (v *NullableDuplicatedPropChildAllOf) Set(val *DuplicatedPropChildAllOf) { - v.value = val - v.isSet = true -} - -func (v NullableDuplicatedPropChildAllOf) IsSet() bool { - return v.isSet -} - -func (v *NullableDuplicatedPropChildAllOf) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableDuplicatedPropChildAllOf(val *DuplicatedPropChildAllOf) *NullableDuplicatedPropChildAllOf { - return &NullableDuplicatedPropChildAllOf{value: val, isSet: true} -} - -func (v NullableDuplicatedPropChildAllOf) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableDuplicatedPropChildAllOf) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/.openapi-generator/FILES b/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/.openapi-generator/FILES index 164e9f57c01..b3e61584f3d 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/.openapi-generator/FILES +++ b/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/.openapi-generator/FILES @@ -6,10 +6,8 @@ api/openapi.yaml build.gradle build.sbt docs/ChildSchema.md -docs/ChildSchemaAllOf.md docs/DefaultApi.md docs/MySchemaNameCharacters.md -docs/MySchemaNameCharactersAllOf.md docs/Parent.md git_push.sh gradle.properties @@ -38,7 +36,5 @@ src/main/java/org/openapitools/client/auth/HttpBasicAuth.java src/main/java/org/openapitools/client/auth/HttpBearerAuth.java src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java src/main/java/org/openapitools/client/model/ChildSchema.java -src/main/java/org/openapitools/client/model/ChildSchemaAllOf.java src/main/java/org/openapitools/client/model/MySchemaNameCharacters.java -src/main/java/org/openapitools/client/model/MySchemaNameCharactersAllOf.java src/main/java/org/openapitools/client/model/Parent.java diff --git a/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/README.md b/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/README.md index 42fdb952c6a..8f201e6f1cb 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/README.md +++ b/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/README.md @@ -144,9 +144,7 @@ Class | Method | HTTP request | Description ## Documentation for Models - [ChildSchema](docs/ChildSchema.md) - - [ChildSchemaAllOf](docs/ChildSchemaAllOf.md) - [MySchemaNameCharacters](docs/MySchemaNameCharacters.md) - - [MySchemaNameCharactersAllOf](docs/MySchemaNameCharactersAllOf.md) - [Parent](docs/Parent.md) diff --git a/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/api/openapi.yaml b/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/api/openapi.yaml index 369e485b55f..2bfcc8d5e15 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/api/openapi.yaml +++ b/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/api/openapi.yaml @@ -33,26 +33,20 @@ components: ChildSchema: allOf: - $ref: '#/components/schemas/Parent' - - $ref: '#/components/schemas/ChildSchema_allOf' + - properties: + prop1: + type: string + type: object description: A schema that does not have any special character. MySchemaName._-Characters: allOf: - $ref: '#/components/schemas/Parent' - - $ref: '#/components/schemas/MySchemaName___Characters_allOf' + - properties: + prop2: + type: string + type: object description: "A schema name that has letters, numbers, punctuation and non-ASCII\ \ characters. The sanitization rules should make it possible to generate a\ \ language-specific classname with allowed characters in that programming\ \ language." - ChildSchema_allOf: - properties: - prop1: - type: string - type: object - example: null - MySchemaName___Characters_allOf: - properties: - prop2: - type: string - type: object - example: null diff --git a/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/docs/ChildSchemaAllOf.md b/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/docs/ChildSchemaAllOf.md deleted file mode 100644 index fc8352cbff1..00000000000 --- a/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/docs/ChildSchemaAllOf.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# ChildSchemaAllOf - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**prop1** | **String** | | [optional] | - - - diff --git a/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/docs/MySchemaNameCharactersAllOf.md b/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/docs/MySchemaNameCharactersAllOf.md deleted file mode 100644 index f74dcbbefcc..00000000000 --- a/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/docs/MySchemaNameCharactersAllOf.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# MySchemaNameCharactersAllOf - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**prop2** | **String** | | [optional] | - - - diff --git a/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/src/main/java/org/openapitools/client/model/ChildSchemaAllOf.java b/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/src/main/java/org/openapitools/client/model/ChildSchemaAllOf.java deleted file mode 100644 index d6851fb740b..00000000000 --- a/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/src/main/java/org/openapitools/client/model/ChildSchemaAllOf.java +++ /dev/null @@ -1,110 +0,0 @@ -/* - * test - * test - * - * The version of the OpenAPI document: 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.client.model; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import org.openapitools.client.JSON; - - -/** - * ChildSchemaAllOf - */ -@JsonPropertyOrder({ - ChildSchemaAllOf.JSON_PROPERTY_PROP1 -}) -@JsonTypeName("ChildSchema_allOf") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ChildSchemaAllOf { - public static final String JSON_PROPERTY_PROP1 = "prop1"; - private String prop1; - - public ChildSchemaAllOf() { - } - - public ChildSchemaAllOf prop1(String prop1) { - this.prop1 = prop1; - return this; - } - - /** - * Get prop1 - * @return prop1 - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PROP1) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getProp1() { - return prop1; - } - - - @JsonProperty(JSON_PROPERTY_PROP1) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setProp1(String prop1) { - this.prop1 = prop1; - } - - - /** - * Return true if this ChildSchema_allOf object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ChildSchemaAllOf childSchemaAllOf = (ChildSchemaAllOf) o; - return Objects.equals(this.prop1, childSchemaAllOf.prop1); - } - - @Override - public int hashCode() { - return Objects.hash(prop1); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ChildSchemaAllOf {\n"); - sb.append(" prop1: ").append(toIndentedString(prop1)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/src/main/java/org/openapitools/client/model/MySchemaNameCharactersAllOf.java b/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/src/main/java/org/openapitools/client/model/MySchemaNameCharactersAllOf.java deleted file mode 100644 index 78aeee21aef..00000000000 --- a/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/src/main/java/org/openapitools/client/model/MySchemaNameCharactersAllOf.java +++ /dev/null @@ -1,110 +0,0 @@ -/* - * test - * test - * - * The version of the OpenAPI document: 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.client.model; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import org.openapitools.client.JSON; - - -/** - * MySchemaNameCharactersAllOf - */ -@JsonPropertyOrder({ - MySchemaNameCharactersAllOf.JSON_PROPERTY_PROP2 -}) -@JsonTypeName("MySchemaName___Characters_allOf") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class MySchemaNameCharactersAllOf { - public static final String JSON_PROPERTY_PROP2 = "prop2"; - private String prop2; - - public MySchemaNameCharactersAllOf() { - } - - public MySchemaNameCharactersAllOf prop2(String prop2) { - this.prop2 = prop2; - return this; - } - - /** - * Get prop2 - * @return prop2 - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PROP2) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getProp2() { - return prop2; - } - - - @JsonProperty(JSON_PROPERTY_PROP2) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setProp2(String prop2) { - this.prop2 = prop2; - } - - - /** - * Return true if this MySchemaName___Characters_allOf object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - MySchemaNameCharactersAllOf mySchemaNameCharactersAllOf = (MySchemaNameCharactersAllOf) o; - return Objects.equals(this.prop2, mySchemaNameCharactersAllOf.prop2); - } - - @Override - public int hashCode() { - return Objects.hash(prop2); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class MySchemaNameCharactersAllOf {\n"); - sb.append(" prop2: ").append(toIndentedString(prop2)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/src/test/java/org/openapitools/client/model/ChildSchemaAllOfTest.java b/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/src/test/java/org/openapitools/client/model/ChildSchemaAllOfTest.java deleted file mode 100644 index 8fcb1de08c6..00000000000 --- a/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/src/test/java/org/openapitools/client/model/ChildSchemaAllOfTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * test - * test - * - * The version of the OpenAPI document: 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.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; - -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for ChildSchemaAllOf - */ -public class ChildSchemaAllOfTest { - private final ChildSchemaAllOf model = new ChildSchemaAllOf(); - - /** - * Model tests for ChildSchemaAllOf - */ - @Test - public void testChildSchemaAllOf() { - // TODO: test ChildSchemaAllOf - } - - /** - * Test the property 'prop1' - */ - @Test - public void prop1Test() { - // TODO: test prop1 - } - -} diff --git a/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/src/test/java/org/openapitools/client/model/ChildSchemaTest.java b/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/src/test/java/org/openapitools/client/model/ChildSchemaTest.java index 895496949e2..044f968747c 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/src/test/java/org/openapitools/client/model/ChildSchemaTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/src/test/java/org/openapitools/client/model/ChildSchemaTest.java @@ -21,8 +21,6 @@ import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; -import org.openapitools.client.JSON; -import org.openapitools.client.model.ChildSchemaAllOf; import org.openapitools.client.model.Parent; import org.junit.jupiter.api.Assertions; @@ -40,15 +38,7 @@ public class ChildSchemaTest { */ @Test public void testChildSchema() { - String objJson = "{ \"objectType\": \"ChildSchema\", \"prop1\":\"some_value\" }"; - try { - JSON j = new JSON(); - ChildSchema obj = j.getMapper().readValue(objJson, ChildSchema.class); - Assertions.assertEquals(obj.getObjectType(), "ChildSchema"); - Assertions.assertEquals(obj.getProp1(), "some_value"); - } catch (Exception ex) { - Assertions.fail("Exception '" + ex.getMessage() + "' should not have been raised"); - } + // TODO: test ChildSchema } /** diff --git a/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/src/test/java/org/openapitools/client/model/MySchemaNameCharactersAllOfTest.java b/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/src/test/java/org/openapitools/client/model/MySchemaNameCharactersAllOfTest.java deleted file mode 100644 index 737fe57916f..00000000000 --- a/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/src/test/java/org/openapitools/client/model/MySchemaNameCharactersAllOfTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * test - * test - * - * The version of the OpenAPI document: 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.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; - -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for MySchemaNameCharactersAllOf - */ -public class MySchemaNameCharactersAllOfTest { - private final MySchemaNameCharactersAllOf model = new MySchemaNameCharactersAllOf(); - - /** - * Model tests for MySchemaNameCharactersAllOf - */ - @Test - public void testMySchemaNameCharactersAllOf() { - // TODO: test MySchemaNameCharactersAllOf - } - - /** - * Test the property 'prop2' - */ - @Test - public void prop2Test() { - // TODO: test prop2 - } - -} diff --git a/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/src/test/java/org/openapitools/client/model/MySchemaNameCharactersTest.java b/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/src/test/java/org/openapitools/client/model/MySchemaNameCharactersTest.java index 0cd5ee7b9f0..a7d4165b974 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/src/test/java/org/openapitools/client/model/MySchemaNameCharactersTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/src/test/java/org/openapitools/client/model/MySchemaNameCharactersTest.java @@ -22,7 +22,6 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import org.openapitools.client.JSON; -import org.openapitools.client.model.MySchemaNameCharactersAllOf; import org.openapitools.client.model.Parent; import org.junit.jupiter.api.Assertions; diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/.openapi-generator/FILES b/samples/openapi3/client/petstore/java/jersey2-java8/.openapi-generator/FILES index 9f9129b99e5..d3d27bc86c3 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/.openapi-generator/FILES +++ b/samples/openapi3/client/petstore/java/jersey2-java8/.openapi-generator/FILES @@ -18,10 +18,8 @@ docs/BananaReq.md docs/BasquePig.md docs/Capitalization.md docs/Cat.md -docs/CatAllOf.md docs/Category.md docs/ChildCat.md -docs/ChildCatAllOf.md docs/ClassModel.md docs/Client.md docs/ComplexQuadrilateral.md @@ -29,7 +27,6 @@ docs/DanishPig.md docs/DefaultApi.md docs/DeprecatedObject.md docs/Dog.md -docs/DogAllOf.md docs/Drawing.md docs/EnumArrays.md docs/EnumClass.md @@ -135,17 +132,14 @@ src/main/java/org/openapitools/client/model/BananaReq.java src/main/java/org/openapitools/client/model/BasquePig.java src/main/java/org/openapitools/client/model/Capitalization.java src/main/java/org/openapitools/client/model/Cat.java -src/main/java/org/openapitools/client/model/CatAllOf.java src/main/java/org/openapitools/client/model/Category.java src/main/java/org/openapitools/client/model/ChildCat.java -src/main/java/org/openapitools/client/model/ChildCatAllOf.java src/main/java/org/openapitools/client/model/ClassModel.java src/main/java/org/openapitools/client/model/Client.java src/main/java/org/openapitools/client/model/ComplexQuadrilateral.java src/main/java/org/openapitools/client/model/DanishPig.java src/main/java/org/openapitools/client/model/DeprecatedObject.java src/main/java/org/openapitools/client/model/Dog.java -src/main/java/org/openapitools/client/model/DogAllOf.java src/main/java/org/openapitools/client/model/Drawing.java src/main/java/org/openapitools/client/model/EnumArrays.java src/main/java/org/openapitools/client/model/EnumClass.java diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/README.md b/samples/openapi3/client/petstore/java/jersey2-java8/README.md index b9fb5b817bd..ec767ccff48 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/README.md +++ b/samples/openapi3/client/petstore/java/jersey2-java8/README.md @@ -193,17 +193,14 @@ Class | Method | HTTP request | Description - [BasquePig](docs/BasquePig.md) - [Capitalization](docs/Capitalization.md) - [Cat](docs/Cat.md) - - [CatAllOf](docs/CatAllOf.md) - [Category](docs/Category.md) - [ChildCat](docs/ChildCat.md) - - [ChildCatAllOf](docs/ChildCatAllOf.md) - [ClassModel](docs/ClassModel.md) - [Client](docs/Client.md) - [ComplexQuadrilateral](docs/ComplexQuadrilateral.md) - [DanishPig](docs/DanishPig.md) - [DeprecatedObject](docs/DeprecatedObject.md) - [Dog](docs/Dog.md) - - [DogAllOf](docs/DogAllOf.md) - [Drawing](docs/Drawing.md) - [EnumArrays](docs/EnumArrays.md) - [EnumClass](docs/EnumClass.md) diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/api/openapi.yaml b/samples/openapi3/client/petstore/java/jersey2-java8/api/openapi.yaml index b02c0b26cb7..82435d1c056 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/api/openapi.yaml +++ b/samples/openapi3/client/petstore/java/jersey2-java8/api/openapi.yaml @@ -1416,12 +1416,18 @@ components: Dog: allOf: - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Dog_allOf' + - properties: + breed: + type: string + type: object Cat: allOf: - $ref: '#/components/schemas/Animal' - $ref: '#/components/schemas/Address' - - $ref: '#/components/schemas/Cat_allOf' + - properties: + declawed: + type: boolean + type: object Address: additionalProperties: type: integer @@ -2105,7 +2111,16 @@ components: ChildCat: allOf: - $ref: '#/components/schemas/ParentPet' - - $ref: '#/components/schemas/ChildCat_allOf' + - properties: + name: + type: string + pet_type: + default: ChildCat + enum: + - ChildCat + type: string + x-enum-as-string: true + type: object ArrayOfEnums: items: $ref: '#/components/schemas/OuterEnum' @@ -2281,30 +2296,6 @@ components: required: - requiredFile type: object - Dog_allOf: - properties: - breed: - type: string - type: object - example: null - Cat_allOf: - properties: - declawed: - type: boolean - type: object - example: null - ChildCat_allOf: - properties: - name: - type: string - pet_type: - default: ChildCat - enum: - - ChildCat - type: string - x-enum-as-string: true - type: object - example: null securitySchemes: petstore_auth: flows: diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/docs/CatAllOf.md b/samples/openapi3/client/petstore/java/jersey2-java8/docs/CatAllOf.md deleted file mode 100644 index 926bc0abd78..00000000000 --- a/samples/openapi3/client/petstore/java/jersey2-java8/docs/CatAllOf.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# CatAllOf - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**declawed** | **Boolean** | | [optional] | - - - diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/docs/ChildCatAllOf.md b/samples/openapi3/client/petstore/java/jersey2-java8/docs/ChildCatAllOf.md deleted file mode 100644 index 35fac5c5f09..00000000000 --- a/samples/openapi3/client/petstore/java/jersey2-java8/docs/ChildCatAllOf.md +++ /dev/null @@ -1,22 +0,0 @@ - - -# ChildCatAllOf - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**name** | **String** | | [optional] | -|**petType** | [**String**](#String) | | [optional] | - - - -## Enum: String - -| Name | Value | -|---- | -----| -| CHILDCAT | "ChildCat" | - - - diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/docs/DogAllOf.md b/samples/openapi3/client/petstore/java/jersey2-java8/docs/DogAllOf.md deleted file mode 100644 index d4e4ea0d548..00000000000 --- a/samples/openapi3/client/petstore/java/jersey2-java8/docs/DogAllOf.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# DogAllOf - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**breed** | **String** | | [optional] | - - - diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/CatAllOf.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/CatAllOf.java deleted file mode 100644 index b2b20d77e38..00000000000 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/CatAllOf.java +++ /dev/null @@ -1,110 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import org.openapitools.client.JSON; - - -/** - * CatAllOf - */ -@JsonPropertyOrder({ - CatAllOf.JSON_PROPERTY_DECLAWED -}) -@JsonTypeName("Cat_allOf") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CatAllOf { - public static final String JSON_PROPERTY_DECLAWED = "declawed"; - private Boolean declawed; - - public CatAllOf() { - } - - public CatAllOf declawed(Boolean declawed) { - this.declawed = declawed; - return this; - } - - /** - * Get declawed - * @return declawed - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DECLAWED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Boolean getDeclawed() { - return declawed; - } - - - @JsonProperty(JSON_PROPERTY_DECLAWED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDeclawed(Boolean declawed) { - this.declawed = declawed; - } - - - /** - * Return true if this Cat_allOf object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CatAllOf catAllOf = (CatAllOf) o; - return Objects.equals(this.declawed, catAllOf.declawed); - } - - @Override - public int hashCode() { - return Objects.hash(declawed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CatAllOf {\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ChildCatAllOf.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ChildCatAllOf.java deleted file mode 100644 index 7b83a14dbf3..00000000000 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/ChildCatAllOf.java +++ /dev/null @@ -1,155 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.Set; -import java.util.HashSet; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import org.openapitools.client.JSON; - - -/** - * ChildCatAllOf - */ -@JsonPropertyOrder({ - ChildCatAllOf.JSON_PROPERTY_NAME, - ChildCatAllOf.JSON_PROPERTY_PET_TYPE -}) -@JsonTypeName("ChildCat_allOf") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ChildCatAllOf { - public static final String JSON_PROPERTY_NAME = "name"; - private String name; - - public static final String JSON_PROPERTY_PET_TYPE = "pet_type"; - private String petType = "ChildCat"; - - public ChildCatAllOf() { - } - - public ChildCatAllOf name(String name) { - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getName() { - return name; - } - - - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { - this.name = name; - } - - - public static final Set PET_TYPE_VALUES = new HashSet<>(Arrays.asList( - "ChildCat" - )); - - public ChildCatAllOf petType(String petType) { - if (!PET_TYPE_VALUES.contains(petType)) { - throw new IllegalArgumentException(petType + " is invalid. Possible values for petType: " + String.join(", ", PET_TYPE_VALUES)); - } - - this.petType = petType; - return this; - } - - /** - * Get petType - * @return petType - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PET_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getPetType() { - return petType; - } - - - @JsonProperty(JSON_PROPERTY_PET_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPetType(String petType) { - if (!PET_TYPE_VALUES.contains(petType)) { - throw new IllegalArgumentException(petType + " is invalid. Possible values for petType: " + String.join(", ", PET_TYPE_VALUES)); - } - - this.petType = petType; - } - - - /** - * Return true if this ChildCat_allOf object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ChildCatAllOf childCatAllOf = (ChildCatAllOf) o; - return Objects.equals(this.name, childCatAllOf.name) && - Objects.equals(this.petType, childCatAllOf.petType); - } - - @Override - public int hashCode() { - return Objects.hash(name, petType); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ChildCatAllOf {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" petType: ").append(toIndentedString(petType)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/DogAllOf.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/DogAllOf.java deleted file mode 100644 index a9b84e23719..00000000000 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/DogAllOf.java +++ /dev/null @@ -1,110 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import org.openapitools.client.JSON; - - -/** - * DogAllOf - */ -@JsonPropertyOrder({ - DogAllOf.JSON_PROPERTY_BREED -}) -@JsonTypeName("Dog_allOf") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DogAllOf { - public static final String JSON_PROPERTY_BREED = "breed"; - private String breed; - - public DogAllOf() { - } - - public DogAllOf breed(String breed) { - this.breed = breed; - return this; - } - - /** - * Get breed - * @return breed - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_BREED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getBreed() { - return breed; - } - - - @JsonProperty(JSON_PROPERTY_BREED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setBreed(String breed) { - this.breed = breed; - } - - - /** - * Return true if this Dog_allOf object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DogAllOf dogAllOf = (DogAllOf) o; - return Objects.equals(this.breed, dogAllOf.breed); - } - - @Override - public int hashCode() { - return Objects.hash(breed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DogAllOf {\n"); - sb.append(" breed: ").append(toIndentedString(breed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/CatAllOfTest.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/CatAllOfTest.java deleted file mode 100644 index 7ec3638d0ef..00000000000 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/CatAllOfTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; - -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for CatAllOf - */ -public class CatAllOfTest { - private final CatAllOf model = new CatAllOf(); - - /** - * Model tests for CatAllOf - */ - @Test - public void testCatAllOf() { - // TODO: test CatAllOf - } - - /** - * Test the property 'declawed' - */ - @Test - public void declawedTest() { - // TODO: test declawed - } - -} diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ChildCatAllOfTest.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ChildCatAllOfTest.java deleted file mode 100644 index 3a12da4d2db..00000000000 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ChildCatAllOfTest.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.Set; -import java.util.HashSet; - -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for ChildCatAllOf - */ -public class ChildCatAllOfTest { - private final ChildCatAllOf model = new ChildCatAllOf(); - - /** - * Model tests for ChildCatAllOf - */ - @Test - public void testChildCatAllOf() { - // TODO: test ChildCatAllOf - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - - /** - * Test the property 'petType' - */ - @Test - public void petTypeTest() { - // TODO: test petType - } - -} diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/DogAllOfTest.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/DogAllOfTest.java deleted file mode 100644 index ffafa256753..00000000000 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/DogAllOfTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; - -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for DogAllOf - */ -public class DogAllOfTest { - private final DogAllOf model = new DogAllOf(); - - /** - * Model tests for DogAllOf - */ - @Test - public void testDogAllOf() { - // TODO: test DogAllOf - } - - /** - * Test the property 'breed' - */ - @Test - public void breedTest() { - // TODO: test breed - } - -} diff --git a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/.openapi-generator-ignore b/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/.openapi-generator-ignore deleted file mode 100644 index 7484ee590a3..00000000000 --- a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# 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/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/.openapi-generator/FILES b/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/.openapi-generator/FILES deleted file mode 100644 index 0caf05fc277..00000000000 --- a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/.openapi-generator/FILES +++ /dev/null @@ -1,49 +0,0 @@ -pom.xml -src/gen/java/org/openapitools/api/AnotherFakeApi.java -src/gen/java/org/openapitools/api/DefaultApi.java -src/gen/java/org/openapitools/api/FakeApi.java -src/gen/java/org/openapitools/api/FakeClassnameTags123Api.java -src/gen/java/org/openapitools/api/PetApi.java -src/gen/java/org/openapitools/api/StoreApi.java -src/gen/java/org/openapitools/api/UserApi.java -src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java -src/gen/java/org/openapitools/model/Animal.java -src/gen/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java -src/gen/java/org/openapitools/model/ArrayOfNumberOnly.java -src/gen/java/org/openapitools/model/ArrayTest.java -src/gen/java/org/openapitools/model/Capitalization.java -src/gen/java/org/openapitools/model/Cat.java -src/gen/java/org/openapitools/model/CatAllOf.java -src/gen/java/org/openapitools/model/Category.java -src/gen/java/org/openapitools/model/ClassModel.java -src/gen/java/org/openapitools/model/Client.java -src/gen/java/org/openapitools/model/Dog.java -src/gen/java/org/openapitools/model/DogAllOf.java -src/gen/java/org/openapitools/model/EnumArrays.java -src/gen/java/org/openapitools/model/EnumClass.java -src/gen/java/org/openapitools/model/EnumTest.java -src/gen/java/org/openapitools/model/FileSchemaTestClass.java -src/gen/java/org/openapitools/model/Foo.java -src/gen/java/org/openapitools/model/FormatTest.java -src/gen/java/org/openapitools/model/HasOnlyReadOnly.java -src/gen/java/org/openapitools/model/HealthCheckResult.java -src/gen/java/org/openapitools/model/InlineResponseDefault.java -src/gen/java/org/openapitools/model/MapTest.java -src/gen/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java -src/gen/java/org/openapitools/model/Model200Response.java -src/gen/java/org/openapitools/model/ModelApiResponse.java -src/gen/java/org/openapitools/model/ModelReturn.java -src/gen/java/org/openapitools/model/Name.java -src/gen/java/org/openapitools/model/NullableClass.java -src/gen/java/org/openapitools/model/NumberOnly.java -src/gen/java/org/openapitools/model/Order.java -src/gen/java/org/openapitools/model/OuterComposite.java -src/gen/java/org/openapitools/model/OuterEnum.java -src/gen/java/org/openapitools/model/OuterEnumDefaultValue.java -src/gen/java/org/openapitools/model/OuterEnumInteger.java -src/gen/java/org/openapitools/model/OuterEnumIntegerDefaultValue.java -src/gen/java/org/openapitools/model/Pet.java -src/gen/java/org/openapitools/model/ReadOnlyFirst.java -src/gen/java/org/openapitools/model/SpecialModelName.java -src/gen/java/org/openapitools/model/Tag.java -src/gen/java/org/openapitools/model/User.java diff --git a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/.openapi-generator/VERSION b/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/.openapi-generator/VERSION deleted file mode 100644 index c30f0ec2be7..00000000000 --- a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -5.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/pom.xml b/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/pom.xml deleted file mode 100644 index d62a5acd488..00000000000 --- a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/pom.xml +++ /dev/null @@ -1,187 +0,0 @@ - - 4.0.0 - org.openapitools - openapi-jaxrs-client - jar - openapi-jaxrs-client - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - 1.0.0 - - src/main/java - - - maven-failsafe-plugin - 2.6 - - - - integration-test - verify - - - - - - - org.codehaus.mojo - build-helper-maven-plugin - 1.9.1 - - - add-source - generate-sources - - add-source - - - - src/gen/java - - - - - - - - - - io.swagger - swagger-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 - - - - org.apache.cxf - cxf-rt-rs-client - ${cxf-version} - test - - - - - org.apache.cxf - cxf-rt-frontend-jaxrs - ${cxf-version} - compile - - - org.apache.cxf - cxf-rt-rs-service-description - ${cxf-version} - compile - - - org.apache.cxf - cxf-rt-ws-policy - ${cxf-version} - compile - - - org.apache.cxf - cxf-rt-wsdl - ${cxf-version} - compile - - - com.fasterxml.jackson.jaxrs - jackson-jaxrs-json-provider - ${jackson-jaxrs-version} - compile - - - com.fasterxml.jackson.datatype - jackson-datatype-joda - ${jackson-jaxrs-version} - - - org.openapitools - jackson-databind-nullable - ${jackson-databind-nullable-version} - - - jakarta.annotation - jakarta.annotation-api - ${jakarta-annotation-version} - provided - - - - - sonatype-snapshots - https://oss.sonatype.org/content/repositories/snapshots - - true - - - - - 1.7 - ${java.version} - ${java.version} - 1.5.18 - 9.2.9.v20150224 - 4.13.2 - 1.2.10 - 2.5 - 3.3.0 - 2.9.9 - 1.3.5 - 0.2.1 - UTF-8 - - diff --git a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/api/AnotherFakeApi.java b/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/api/AnotherFakeApi.java deleted file mode 100644 index 8dfdd76aafb..00000000000 --- a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/api/AnotherFakeApi.java +++ /dev/null @@ -1,45 +0,0 @@ -package org.openapitools.api; - -import org.openapitools.model.Client; - -import java.io.InputStream; -import java.io.OutputStream; -import java.util.List; -import java.util.Map; -import javax.ws.rs.*; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.MediaType; -import org.apache.cxf.jaxrs.ext.multipart.*; - -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import io.swagger.annotations.ApiResponses; -import io.swagger.annotations.ApiResponse; -import io.swagger.jaxrs.PATCH; - -/** - * 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: \" \\ - * - */ -@Path("/another-fake/dummy") -@Api(value = "/", description = "") -public interface AnotherFakeApi { - - /** - * To test special tags - * - * To test special tags and operation ID starting with number - * - */ - @PATCH - - @Consumes({ "application/json" }) - @Produces({ "application/json" }) - @ApiOperation(value = "To test special tags", tags={ }) - @ApiResponses(value = { - @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) - public Client call123testSpecialTags(Client client); -} - diff --git a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/api/DefaultApi.java b/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/api/DefaultApi.java deleted file mode 100644 index 3f89d74c9ed..00000000000 --- a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/api/DefaultApi.java +++ /dev/null @@ -1,38 +0,0 @@ -package org.openapitools.api; - -import org.openapitools.model.InlineResponseDefault; - -import java.io.InputStream; -import java.io.OutputStream; -import java.util.List; -import java.util.Map; -import javax.ws.rs.*; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.MediaType; -import org.apache.cxf.jaxrs.ext.multipart.*; - -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import io.swagger.annotations.ApiResponses; -import io.swagger.annotations.ApiResponse; -import io.swagger.jaxrs.PATCH; - -/** - * 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: \" \\ - * - */ -@Path("/foo") -@Api(value = "/", description = "") -public interface DefaultApi { - - @GET - - @Produces({ "application/json" }) - @ApiOperation(value = "", tags={ }) - @ApiResponses(value = { - @ApiResponse(code = 200, message = "response", response = InlineResponseDefault.class) }) - public InlineResponseDefault fooGet(); -} - diff --git a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/api/FakeApi.java b/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/api/FakeApi.java deleted file mode 100644 index 2f105b2b40e..00000000000 --- a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/api/FakeApi.java +++ /dev/null @@ -1,204 +0,0 @@ -package org.openapitools.api; - -import java.math.BigDecimal; -import org.openapitools.model.Client; -import java.util.Date; -import java.io.File; -import org.openapitools.model.FileSchemaTestClass; -import org.openapitools.model.HealthCheckResult; -import org.joda.time.LocalDate; -import org.openapitools.model.OuterComposite; -import org.openapitools.model.Pet; -import org.openapitools.model.User; - -import java.io.InputStream; -import java.io.OutputStream; -import java.util.List; -import java.util.Map; -import javax.ws.rs.*; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.MediaType; -import org.apache.cxf.jaxrs.ext.multipart.*; - -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import io.swagger.annotations.ApiResponses; -import io.swagger.annotations.ApiResponse; -import io.swagger.jaxrs.PATCH; - -/** - * 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: \" \\ - * - */ -@Path("/fake") -@Api(value = "/", description = "") -public interface FakeApi { - - /** - * Health check endpoint - * - */ - @GET - @Path("/health") - @Produces({ "application/json" }) - @ApiOperation(value = "Health check endpoint", tags={ }) - @ApiResponses(value = { - @ApiResponse(code = 200, message = "The instance started successfully", response = HealthCheckResult.class) }) - public HealthCheckResult fakeHealthGet(); - - /** - * test http signature authentication - * - */ - @GET - @Path("/http-signature-test") - @Consumes({ "application/json", "application/xml" }) - @ApiOperation(value = "test http signature authentication", tags={ }) - @ApiResponses(value = { - @ApiResponse(code = 200, message = "The instance started successfully") }) - public void fakeHttpSignatureTest(Pet pet, @QueryParam("query_1") String query1, @HeaderParam("header_1") String header1); - - @POST - @Path("/outer/boolean") - @Consumes({ "application/json" }) - @Produces({ "*/*" }) - @ApiOperation(value = "", tags={ }) - @ApiResponses(value = { - @ApiResponse(code = 200, message = "Output boolean", response = Boolean.class) }) - public Boolean fakeOuterBooleanSerialize(Boolean body); - - @POST - @Path("/outer/composite") - @Consumes({ "application/json" }) - @Produces({ "*/*" }) - @ApiOperation(value = "", tags={ }) - @ApiResponses(value = { - @ApiResponse(code = 200, message = "Output composite", response = OuterComposite.class) }) - public OuterComposite fakeOuterCompositeSerialize(OuterComposite outerComposite); - - @POST - @Path("/outer/number") - @Consumes({ "application/json" }) - @Produces({ "*/*" }) - @ApiOperation(value = "", tags={ }) - @ApiResponses(value = { - @ApiResponse(code = 200, message = "Output number", response = BigDecimal.class) }) - public BigDecimal fakeOuterNumberSerialize(BigDecimal body); - - @POST - @Path("/outer/string") - @Consumes({ "application/json" }) - @Produces({ "*/*" }) - @ApiOperation(value = "", tags={ }) - @ApiResponses(value = { - @ApiResponse(code = 200, message = "Output string", response = String.class) }) - public String fakeOuterStringSerialize(String body); - - @PUT - @Path("/body-with-file-schema") - @Consumes({ "application/json" }) - @ApiOperation(value = "", tags={ }) - @ApiResponses(value = { - @ApiResponse(code = 200, message = "Success") }) - public void testBodyWithFileSchema(FileSchemaTestClass fileSchemaTestClass); - - @PUT - @Path("/body-with-query-params") - @Consumes({ "application/json" }) - @ApiOperation(value = "", tags={ }) - @ApiResponses(value = { - @ApiResponse(code = 200, message = "Success") }) - public void testBodyWithQueryParams(@QueryParam("query") String query, User user); - - /** - * To test \"client\" model - * - * To test \"client\" model - * - */ - @PATCH - - @Consumes({ "application/json" }) - @Produces({ "application/json" }) - @ApiOperation(value = "To test \"client\" model", tags={ }) - @ApiResponses(value = { - @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) - public Client testClientModel(Client client); - - /** - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - * - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - * - */ - @POST - - @Consumes({ "application/x-www-form-urlencoded" }) - @ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", tags={ }) - @ApiResponses(value = { - @ApiResponse(code = 400, message = "Invalid username supplied"), - @ApiResponse(code = 404, message = "User not found") }) - public void testEndpointParameters(@Multipart(value = "number") BigDecimal number, @Multipart(value = "double") Double _double, @Multipart(value = "pattern_without_delimiter") String patternWithoutDelimiter, @Multipart(value = "byte") byte[] _byte, @Multipart(value = "integer", required = false) Integer integer, @Multipart(value = "int32", required = false) Integer int32, @Multipart(value = "int64", required = false) Long int64, @Multipart(value = "float", required = false) Float _float, @Multipart(value = "string", required = false) String string, @Multipart(value = "binary" , required = false) Attachment binaryDetail, @Multipart(value = "date", required = false) LocalDate date, @Multipart(value = "dateTime", required = false) Date dateTime, @Multipart(value = "password", required = false) String password, @Multipart(value = "callback", required = false) String paramCallback); - - /** - * To test enum parameters - * - * To test enum parameters - * - */ - @GET - - @Consumes({ "application/x-www-form-urlencoded" }) - @ApiOperation(value = "To test enum parameters", tags={ }) - @ApiResponses(value = { - @ApiResponse(code = 400, message = "Invalid request"), - @ApiResponse(code = 404, message = "Not found") }) - public void testEnumParameters(@HeaderParam("enum_header_string_array") List enumHeaderStringArray, @HeaderParam("enum_header_string") String enumHeaderString, @QueryParam("enum_query_string_array") List enumQueryStringArray, @QueryParam("enum_query_string") @DefaultValue("-efg")String enumQueryString, @QueryParam("enum_query_integer") Integer enumQueryInteger, @QueryParam("enum_query_double") Double enumQueryDouble, @Multipart(value = "enum_form_string_array", required = false) List enumFormStringArray, @Multipart(value = "enum_form_string", required = false) String enumFormString); - - /** - * Fake endpoint to test group parameters (optional) - * - * Fake endpoint to test group parameters (optional) - * - */ - @DELETE - - @ApiOperation(value = "Fake endpoint to test group parameters (optional)", tags={ }) - @ApiResponses(value = { - @ApiResponse(code = 400, message = "Something wrong") }) - public void testGroupParameters(@QueryParam("required_string_group") Integer requiredStringGroup, @HeaderParam("required_boolean_group") Boolean requiredBooleanGroup, @QueryParam("required_int64_group") Long requiredInt64Group, @QueryParam("string_group") Integer stringGroup, @HeaderParam("boolean_group") Boolean booleanGroup, @QueryParam("int64_group") Long int64Group); - - /** - * test inline additionalProperties - * - */ - @POST - @Path("/inline-additionalProperties") - @Consumes({ "application/json" }) - @ApiOperation(value = "test inline additionalProperties", tags={ }) - @ApiResponses(value = { - @ApiResponse(code = 200, message = "successful operation") }) - public void testInlineAdditionalProperties(Map requestBody); - - /** - * test json serialization of form data - * - */ - @GET - @Path("/jsonFormData") - @Consumes({ "application/x-www-form-urlencoded" }) - @ApiOperation(value = "test json serialization of form data", tags={ }) - @ApiResponses(value = { - @ApiResponse(code = 200, message = "successful operation") }) - public void testJsonFormData(@Multipart(value = "param") String param, @Multipart(value = "param2") String param2); - - @PUT - @Path("/test-query-parameters") - @ApiOperation(value = "", tags={ }) - @ApiResponses(value = { - @ApiResponse(code = 200, message = "Success") }) - public void testQueryParameterCollectionFormat(@QueryParam("pipe") List pipe, @QueryParam("ioutil") List ioutil, @QueryParam("http") List http, @QueryParam("url") List url, @QueryParam("context") List context); -} - diff --git a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/api/FakeClassnameTags123Api.java b/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/api/FakeClassnameTags123Api.java deleted file mode 100644 index b973be7d283..00000000000 --- a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/api/FakeClassnameTags123Api.java +++ /dev/null @@ -1,45 +0,0 @@ -package org.openapitools.api; - -import org.openapitools.model.Client; - -import java.io.InputStream; -import java.io.OutputStream; -import java.util.List; -import java.util.Map; -import javax.ws.rs.*; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.MediaType; -import org.apache.cxf.jaxrs.ext.multipart.*; - -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import io.swagger.annotations.ApiResponses; -import io.swagger.annotations.ApiResponse; -import io.swagger.jaxrs.PATCH; - -/** - * 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: \" \\ - * - */ -@Path("/fake_classname_test") -@Api(value = "/", description = "") -public interface FakeClassnameTags123Api { - - /** - * To test class name in snake case - * - * To test class name in snake case - * - */ - @PATCH - - @Consumes({ "application/json" }) - @Produces({ "application/json" }) - @ApiOperation(value = "To test class name in snake case", tags={ }) - @ApiResponses(value = { - @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) - public Client testClassname(Client client); -} - diff --git a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/api/PetApi.java b/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/api/PetApi.java deleted file mode 100644 index 09048cfdd1a..00000000000 --- a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/api/PetApi.java +++ /dev/null @@ -1,158 +0,0 @@ -package org.openapitools.api; - -import java.io.File; -import org.openapitools.model.ModelApiResponse; -import org.openapitools.model.Pet; -import java.util.Set; - -import java.io.InputStream; -import java.io.OutputStream; -import java.util.List; -import java.util.Map; -import javax.ws.rs.*; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.MediaType; -import org.apache.cxf.jaxrs.ext.multipart.*; - -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import io.swagger.annotations.ApiResponses; -import io.swagger.annotations.ApiResponse; -import io.swagger.jaxrs.PATCH; - -/** - * 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: \" \\ - * - */ -@Path("") -@Api(value = "/", description = "") -public interface PetApi { - - /** - * Add a new pet to the store - * - */ - @POST - @Path("/pet") - @Consumes({ "application/json", "application/xml" }) - @ApiOperation(value = "Add a new pet to the store", tags={ }) - @ApiResponses(value = { - @ApiResponse(code = 200, message = "Successful operation"), - @ApiResponse(code = 405, message = "Invalid input") }) - public void addPet(Pet pet); - - /** - * Deletes a pet - * - */ - @DELETE - @Path("/pet/{petId}") - @ApiOperation(value = "Deletes a pet", tags={ }) - @ApiResponses(value = { - @ApiResponse(code = 200, message = "Successful operation"), - @ApiResponse(code = 400, message = "Invalid pet value") }) - public void deletePet(@PathParam("petId") Long petId, @HeaderParam("api_key") String apiKey); - - /** - * Finds Pets by status - * - * Multiple status values can be provided with comma separated strings - * - */ - @GET - @Path("/pet/findByStatus") - @Produces({ "application/xml", "application/json" }) - @ApiOperation(value = "Finds Pets by status", tags={ }) - @ApiResponses(value = { - @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), - @ApiResponse(code = 400, message = "Invalid status value") }) - public List findPetsByStatus(@QueryParam("status") List status); - - /** - * Finds Pets by tags - * - * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - * - */ - @GET - @Path("/pet/findByTags") - @Produces({ "application/xml", "application/json" }) - @ApiOperation(value = "Finds Pets by tags", tags={ }) - @ApiResponses(value = { - @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "Set"), - @ApiResponse(code = 400, message = "Invalid tag value") }) - public Set findPetsByTags(@QueryParam("tags") Set tags); - - /** - * Find pet by ID - * - * Returns a single pet - * - */ - @GET - @Path("/pet/{petId}") - @Produces({ "application/xml", "application/json" }) - @ApiOperation(value = "Find pet by ID", tags={ }) - @ApiResponses(value = { - @ApiResponse(code = 200, message = "successful operation", response = Pet.class), - @ApiResponse(code = 400, message = "Invalid ID supplied"), - @ApiResponse(code = 404, message = "Pet not found") }) - public Pet getPetById(@PathParam("petId") Long petId); - - /** - * Update an existing pet - * - */ - @PUT - @Path("/pet") - @Consumes({ "application/json", "application/xml" }) - @ApiOperation(value = "Update an existing pet", tags={ }) - @ApiResponses(value = { - @ApiResponse(code = 200, message = "Successful operation"), - @ApiResponse(code = 400, message = "Invalid ID supplied"), - @ApiResponse(code = 404, message = "Pet not found"), - @ApiResponse(code = 405, message = "Validation exception") }) - public void updatePet(Pet pet); - - /** - * Updates a pet in the store with form data - * - */ - @POST - @Path("/pet/{petId}") - @Consumes({ "application/x-www-form-urlencoded" }) - @ApiOperation(value = "Updates a pet in the store with form data", tags={ }) - @ApiResponses(value = { - @ApiResponse(code = 200, message = "Successful operation"), - @ApiResponse(code = 405, message = "Invalid input") }) - public void updatePetWithForm(@PathParam("petId") Long petId, @Multipart(value = "name", required = false) String name, @Multipart(value = "status", required = false) String status); - - /** - * uploads an image - * - */ - @POST - @Path("/pet/{petId}/uploadImage") - @Consumes({ "multipart/form-data" }) - @Produces({ "application/json" }) - @ApiOperation(value = "uploads an image", tags={ }) - @ApiResponses(value = { - @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) - public ModelApiResponse uploadFile(@PathParam("petId") Long petId, @Multipart(value = "additionalMetadata", required = false) String additionalMetadata, @Multipart(value = "file" , required = false) Attachment fileDetail); - - /** - * uploads an image (required) - * - */ - @POST - @Path("/fake/{petId}/uploadImageWithRequiredFile") - @Consumes({ "multipart/form-data" }) - @Produces({ "application/json" }) - @ApiOperation(value = "uploads an image (required)", tags={ }) - @ApiResponses(value = { - @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) - public ModelApiResponse uploadFileWithRequiredFile(@PathParam("petId") Long petId, @Multipart(value = "requiredFile" ) Attachment requiredFileDetail, @Multipart(value = "additionalMetadata", required = false) String additionalMetadata); -} - diff --git a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/api/StoreApi.java b/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/api/StoreApi.java deleted file mode 100644 index 06afe6cc262..00000000000 --- a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/api/StoreApi.java +++ /dev/null @@ -1,88 +0,0 @@ -package org.openapitools.api; - -import org.openapitools.model.Order; - -import java.io.InputStream; -import java.io.OutputStream; -import java.util.List; -import java.util.Map; -import javax.ws.rs.*; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.MediaType; -import org.apache.cxf.jaxrs.ext.multipart.*; - -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import io.swagger.annotations.ApiResponses; -import io.swagger.annotations.ApiResponse; -import io.swagger.jaxrs.PATCH; - -/** - * 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: \" \\ - * - */ -@Path("/store") -@Api(value = "/", description = "") -public interface StoreApi { - - /** - * Delete purchase order by ID - * - * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - * - */ - @DELETE - @Path("/order/{order_id}") - @ApiOperation(value = "Delete purchase order by ID", tags={ }) - @ApiResponses(value = { - @ApiResponse(code = 400, message = "Invalid ID supplied"), - @ApiResponse(code = 404, message = "Order not found") }) - public void deleteOrder(@PathParam("order_id") String orderId); - - /** - * Returns pet inventories by status - * - * Returns a map of status codes to quantities - * - */ - @GET - @Path("/inventory") - @Produces({ "application/json" }) - @ApiOperation(value = "Returns pet inventories by status", tags={ }) - @ApiResponses(value = { - @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") }) - public Map getInventory(); - - /** - * Find purchase order by ID - * - * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions - * - */ - @GET - @Path("/order/{order_id}") - @Produces({ "application/xml", "application/json" }) - @ApiOperation(value = "Find purchase order by ID", tags={ }) - @ApiResponses(value = { - @ApiResponse(code = 200, message = "successful operation", response = Order.class), - @ApiResponse(code = 400, message = "Invalid ID supplied"), - @ApiResponse(code = 404, message = "Order not found") }) - public Order getOrderById(@PathParam("order_id") Long orderId); - - /** - * Place an order for a pet - * - */ - @POST - @Path("/order") - @Consumes({ "application/json" }) - @Produces({ "application/xml", "application/json" }) - @ApiOperation(value = "Place an order for a pet", tags={ }) - @ApiResponses(value = { - @ApiResponse(code = 200, message = "successful operation", response = Order.class), - @ApiResponse(code = 400, message = "Invalid Order") }) - public Order placeOrder(Order order); -} - diff --git a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/api/UserApi.java b/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/api/UserApi.java deleted file mode 100644 index d27415f2056..00000000000 --- a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/api/UserApi.java +++ /dev/null @@ -1,135 +0,0 @@ -package org.openapitools.api; - -import org.openapitools.model.User; - -import java.io.InputStream; -import java.io.OutputStream; -import java.util.List; -import java.util.Map; -import javax.ws.rs.*; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.MediaType; -import org.apache.cxf.jaxrs.ext.multipart.*; - -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import io.swagger.annotations.ApiResponses; -import io.swagger.annotations.ApiResponse; -import io.swagger.jaxrs.PATCH; - -/** - * 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: \" \\ - * - */ -@Path("/user") -@Api(value = "/", description = "") -public interface UserApi { - - /** - * Create user - * - * This can only be done by the logged in user. - * - */ - @POST - - @Consumes({ "application/json" }) - @ApiOperation(value = "Create user", tags={ }) - @ApiResponses(value = { - @ApiResponse(code = 200, message = "successful operation") }) - public void createUser(User user); - - /** - * Creates list of users with given input array - * - */ - @POST - @Path("/createWithArray") - @Consumes({ "application/json" }) - @ApiOperation(value = "Creates list of users with given input array", tags={ }) - @ApiResponses(value = { - @ApiResponse(code = 200, message = "successful operation") }) - public void createUsersWithArrayInput(List user); - - /** - * Creates list of users with given input array - * - */ - @POST - @Path("/createWithList") - @Consumes({ "application/json" }) - @ApiOperation(value = "Creates list of users with given input array", tags={ }) - @ApiResponses(value = { - @ApiResponse(code = 200, message = "successful operation") }) - public void createUsersWithListInput(List user); - - /** - * Delete user - * - * This can only be done by the logged in user. - * - */ - @DELETE - @Path("/{username}") - @ApiOperation(value = "Delete user", tags={ }) - @ApiResponses(value = { - @ApiResponse(code = 400, message = "Invalid username supplied"), - @ApiResponse(code = 404, message = "User not found") }) - public void deleteUser(@PathParam("username") String username); - - /** - * Get user by user name - * - */ - @GET - @Path("/{username}") - @Produces({ "application/xml", "application/json" }) - @ApiOperation(value = "Get user by user name", tags={ }) - @ApiResponses(value = { - @ApiResponse(code = 200, message = "successful operation", response = User.class), - @ApiResponse(code = 400, message = "Invalid username supplied"), - @ApiResponse(code = 404, message = "User not found") }) - public User getUserByName(@PathParam("username") String username); - - /** - * Logs user into the system - * - */ - @GET - @Path("/login") - @Produces({ "application/xml", "application/json" }) - @ApiOperation(value = "Logs user into the system", tags={ }) - @ApiResponses(value = { - @ApiResponse(code = 200, message = "successful operation", response = String.class), - @ApiResponse(code = 400, message = "Invalid username/password supplied") }) - public String loginUser(@QueryParam("username") String username, @QueryParam("password") String password); - - /** - * Logs out current logged in user session - * - */ - @GET - @Path("/logout") - @ApiOperation(value = "Logs out current logged in user session", tags={ }) - @ApiResponses(value = { - @ApiResponse(code = 200, message = "successful operation") }) - public void logoutUser(); - - /** - * Updated user - * - * This can only be done by the logged in user. - * - */ - @PUT - @Path("/{username}") - @Consumes({ "application/json" }) - @ApiOperation(value = "Updated user", tags={ }) - @ApiResponses(value = { - @ApiResponse(code = 400, message = "Invalid user supplied"), - @ApiResponse(code = 404, message = "User not found") }) - public void updateUser(@PathParam("username") String username, User user); -} - diff --git a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java deleted file mode 100644 index f0108158055..00000000000 --- a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java +++ /dev/null @@ -1,93 +0,0 @@ -package org.openapitools.model; - -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import io.swagger.annotations.ApiModelProperty; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import com.fasterxml.jackson.annotation.JsonProperty; - -public class AdditionalPropertiesClass { - - @ApiModelProperty(value = "") - private Map mapProperty = null; - - @ApiModelProperty(value = "") - private Map> mapOfMapProperty = null; - /** - * Get mapProperty - * @return mapProperty - **/ - @JsonProperty("map_property") - public Map getMapProperty() { - return mapProperty; - } - - public void setMapProperty(Map mapProperty) { - this.mapProperty = mapProperty; - } - - public AdditionalPropertiesClass mapProperty(Map mapProperty) { - this.mapProperty = mapProperty; - return this; - } - - public AdditionalPropertiesClass putMapPropertyItem(String key, String mapPropertyItem) { - this.mapProperty.put(key, mapPropertyItem); - return this; - } - - /** - * Get mapOfMapProperty - * @return mapOfMapProperty - **/ - @JsonProperty("map_of_map_property") - public Map> getMapOfMapProperty() { - return mapOfMapProperty; - } - - public void setMapOfMapProperty(Map> mapOfMapProperty) { - this.mapOfMapProperty = mapOfMapProperty; - } - - public AdditionalPropertiesClass mapOfMapProperty(Map> mapOfMapProperty) { - this.mapOfMapProperty = mapOfMapProperty; - return this; - } - - public AdditionalPropertiesClass putMapOfMapPropertyItem(String key, Map mapOfMapPropertyItem) { - this.mapOfMapProperty.put(key, mapOfMapPropertyItem); - return this; - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AdditionalPropertiesClass {\n"); - - sb.append(" mapProperty: ").append(toIndentedString(mapProperty)).append("\n"); - sb.append(" mapOfMapProperty: ").append(toIndentedString(mapOfMapProperty)).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 static String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/Animal.java b/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/Animal.java deleted file mode 100644 index 33f76666df7..00000000000 --- a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/Animal.java +++ /dev/null @@ -1,87 +0,0 @@ -package org.openapitools.model; - -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; - -import io.swagger.annotations.ApiModelProperty; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import com.fasterxml.jackson.annotation.JsonProperty; - -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) -@JsonSubTypes({ - @JsonSubTypes.Type(value = Cat.class, name = "Cat"), - @JsonSubTypes.Type(value = Dog.class, name = "Dog"), -}) -public class Animal { - - @ApiModelProperty(required = true, value = "") - private String className; - - @ApiModelProperty(value = "") - private String color = "red"; - /** - * Get className - * @return className - **/ - @JsonProperty("className") - public String getClassName() { - return className; - } - - public void setClassName(String className) { - this.className = className; - } - - public Animal className(String className) { - this.className = className; - return this; - } - - /** - * Get color - * @return color - **/ - @JsonProperty("color") - public String getColor() { - return color; - } - - public void setColor(String color) { - this.color = color; - } - - public Animal color(String color) { - this.color = color; - return this; - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Animal {\n"); - - sb.append(" className: ").append(toIndentedString(className)).append("\n"); - sb.append(" color: ").append(toIndentedString(color)).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 static String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java deleted file mode 100644 index 144c88be4f1..00000000000 --- a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ /dev/null @@ -1,66 +0,0 @@ -package org.openapitools.model; - -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.List; - -import io.swagger.annotations.ApiModelProperty; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import com.fasterxml.jackson.annotation.JsonProperty; - -public class ArrayOfArrayOfNumberOnly { - - @ApiModelProperty(value = "") - private List> arrayArrayNumber = null; - /** - * Get arrayArrayNumber - * @return arrayArrayNumber - **/ - @JsonProperty("ArrayArrayNumber") - public List> getArrayArrayNumber() { - return arrayArrayNumber; - } - - public void setArrayArrayNumber(List> arrayArrayNumber) { - this.arrayArrayNumber = arrayArrayNumber; - } - - public ArrayOfArrayOfNumberOnly arrayArrayNumber(List> arrayArrayNumber) { - this.arrayArrayNumber = arrayArrayNumber; - return this; - } - - public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayArrayNumberItem) { - this.arrayArrayNumber.add(arrayArrayNumberItem); - return this; - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ArrayOfArrayOfNumberOnly {\n"); - - sb.append(" arrayArrayNumber: ").append(toIndentedString(arrayArrayNumber)).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 static String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/ArrayOfNumberOnly.java deleted file mode 100644 index 5b7198ac58f..00000000000 --- a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/ArrayOfNumberOnly.java +++ /dev/null @@ -1,66 +0,0 @@ -package org.openapitools.model; - -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.List; - -import io.swagger.annotations.ApiModelProperty; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import com.fasterxml.jackson.annotation.JsonProperty; - -public class ArrayOfNumberOnly { - - @ApiModelProperty(value = "") - private List arrayNumber = null; - /** - * Get arrayNumber - * @return arrayNumber - **/ - @JsonProperty("ArrayNumber") - public List getArrayNumber() { - return arrayNumber; - } - - public void setArrayNumber(List arrayNumber) { - this.arrayNumber = arrayNumber; - } - - public ArrayOfNumberOnly arrayNumber(List arrayNumber) { - this.arrayNumber = arrayNumber; - return this; - } - - public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { - this.arrayNumber.add(arrayNumberItem); - return this; - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ArrayOfNumberOnly {\n"); - - sb.append(" arrayNumber: ").append(toIndentedString(arrayNumber)).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 static String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/ArrayTest.java b/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/ArrayTest.java deleted file mode 100644 index 14df6ad168d..00000000000 --- a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/ArrayTest.java +++ /dev/null @@ -1,120 +0,0 @@ -package org.openapitools.model; - -import java.util.ArrayList; -import java.util.List; -import org.openapitools.model.ReadOnlyFirst; - -import io.swagger.annotations.ApiModelProperty; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import com.fasterxml.jackson.annotation.JsonProperty; - -public class ArrayTest { - - @ApiModelProperty(value = "") - private List arrayOfString = null; - - @ApiModelProperty(value = "") - private List> arrayArrayOfInteger = null; - - @ApiModelProperty(value = "") - private List> arrayArrayOfModel = null; - /** - * Get arrayOfString - * @return arrayOfString - **/ - @JsonProperty("array_of_string") - public List getArrayOfString() { - return arrayOfString; - } - - public void setArrayOfString(List arrayOfString) { - this.arrayOfString = arrayOfString; - } - - public ArrayTest arrayOfString(List arrayOfString) { - this.arrayOfString = arrayOfString; - return this; - } - - public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { - this.arrayOfString.add(arrayOfStringItem); - return this; - } - - /** - * Get arrayArrayOfInteger - * @return arrayArrayOfInteger - **/ - @JsonProperty("array_array_of_integer") - public List> getArrayArrayOfInteger() { - return arrayArrayOfInteger; - } - - public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { - this.arrayArrayOfInteger = arrayArrayOfInteger; - } - - public ArrayTest arrayArrayOfInteger(List> arrayArrayOfInteger) { - this.arrayArrayOfInteger = arrayArrayOfInteger; - return this; - } - - public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) { - this.arrayArrayOfInteger.add(arrayArrayOfIntegerItem); - return this; - } - - /** - * Get arrayArrayOfModel - * @return arrayArrayOfModel - **/ - @JsonProperty("array_array_of_model") - public List> getArrayArrayOfModel() { - return arrayArrayOfModel; - } - - public void setArrayArrayOfModel(List> arrayArrayOfModel) { - this.arrayArrayOfModel = arrayArrayOfModel; - } - - public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { - this.arrayArrayOfModel = arrayArrayOfModel; - return this; - } - - public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelItem) { - this.arrayArrayOfModel.add(arrayArrayOfModelItem); - return this; - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ArrayTest {\n"); - - sb.append(" arrayOfString: ").append(toIndentedString(arrayOfString)).append("\n"); - sb.append(" arrayArrayOfInteger: ").append(toIndentedString(arrayArrayOfInteger)).append("\n"); - sb.append(" arrayArrayOfModel: ").append(toIndentedString(arrayArrayOfModel)).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 static String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/Capitalization.java b/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/Capitalization.java deleted file mode 100644 index 0019a471c17..00000000000 --- a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/Capitalization.java +++ /dev/null @@ -1,171 +0,0 @@ -package org.openapitools.model; - - -import io.swagger.annotations.ApiModelProperty; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import com.fasterxml.jackson.annotation.JsonProperty; - -public class Capitalization { - - @ApiModelProperty(value = "") - private String smallCamel; - - @ApiModelProperty(value = "") - private String capitalCamel; - - @ApiModelProperty(value = "") - private String smallSnake; - - @ApiModelProperty(value = "") - private String capitalSnake; - - @ApiModelProperty(value = "") - private String scAETHFlowPoints; - - @ApiModelProperty(value = "Name of the pet ") - /** - * Name of the pet - **/ - private String ATT_NAME; - /** - * Get smallCamel - * @return smallCamel - **/ - @JsonProperty("smallCamel") - public String getSmallCamel() { - return smallCamel; - } - - public void setSmallCamel(String smallCamel) { - this.smallCamel = smallCamel; - } - - public Capitalization smallCamel(String smallCamel) { - this.smallCamel = smallCamel; - return this; - } - - /** - * Get capitalCamel - * @return capitalCamel - **/ - @JsonProperty("CapitalCamel") - public String getCapitalCamel() { - return capitalCamel; - } - - public void setCapitalCamel(String capitalCamel) { - this.capitalCamel = capitalCamel; - } - - public Capitalization capitalCamel(String capitalCamel) { - this.capitalCamel = capitalCamel; - return this; - } - - /** - * Get smallSnake - * @return smallSnake - **/ - @JsonProperty("small_Snake") - public String getSmallSnake() { - return smallSnake; - } - - public void setSmallSnake(String smallSnake) { - this.smallSnake = smallSnake; - } - - public Capitalization smallSnake(String smallSnake) { - this.smallSnake = smallSnake; - return this; - } - - /** - * Get capitalSnake - * @return capitalSnake - **/ - @JsonProperty("Capital_Snake") - public String getCapitalSnake() { - return capitalSnake; - } - - public void setCapitalSnake(String capitalSnake) { - this.capitalSnake = capitalSnake; - } - - public Capitalization capitalSnake(String capitalSnake) { - this.capitalSnake = capitalSnake; - return this; - } - - /** - * Get scAETHFlowPoints - * @return scAETHFlowPoints - **/ - @JsonProperty("SCA_ETH_Flow_Points") - public String getScAETHFlowPoints() { - return scAETHFlowPoints; - } - - public void setScAETHFlowPoints(String scAETHFlowPoints) { - this.scAETHFlowPoints = scAETHFlowPoints; - } - - public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { - this.scAETHFlowPoints = scAETHFlowPoints; - return this; - } - - /** - * Name of the pet - * @return ATT_NAME - **/ - @JsonProperty("ATT_NAME") - public String getATTNAME() { - return ATT_NAME; - } - - public void setATTNAME(String ATT_NAME) { - this.ATT_NAME = ATT_NAME; - } - - public Capitalization ATT_NAME(String ATT_NAME) { - this.ATT_NAME = ATT_NAME; - return this; - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Capitalization {\n"); - - sb.append(" smallCamel: ").append(toIndentedString(smallCamel)).append("\n"); - sb.append(" capitalCamel: ").append(toIndentedString(capitalCamel)).append("\n"); - sb.append(" smallSnake: ").append(toIndentedString(smallSnake)).append("\n"); - sb.append(" capitalSnake: ").append(toIndentedString(capitalSnake)).append("\n"); - sb.append(" scAETHFlowPoints: ").append(toIndentedString(scAETHFlowPoints)).append("\n"); - sb.append(" ATT_NAME: ").append(toIndentedString(ATT_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 static String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/Cat.java b/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/Cat.java deleted file mode 100644 index f72d26a1b5f..00000000000 --- a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/Cat.java +++ /dev/null @@ -1,60 +0,0 @@ -package org.openapitools.model; - -import org.openapitools.model.Animal; -import org.openapitools.model.CatAllOf; - -import io.swagger.annotations.ApiModelProperty; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import com.fasterxml.jackson.annotation.JsonProperty; - -public class Cat extends Animal { - - @ApiModelProperty(value = "") - private Boolean declawed; - /** - * Get declawed - * @return declawed - **/ - @JsonProperty("declawed") - public Boolean getDeclawed() { - return declawed; - } - - public void setDeclawed(Boolean declawed) { - this.declawed = declawed; - } - - public Cat declawed(Boolean declawed) { - this.declawed = declawed; - return this; - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Cat {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).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 static String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/CatAllOf.java b/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/CatAllOf.java deleted file mode 100644 index cb2eea85427..00000000000 --- a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/CatAllOf.java +++ /dev/null @@ -1,58 +0,0 @@ -package org.openapitools.model; - - -import io.swagger.annotations.ApiModelProperty; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import com.fasterxml.jackson.annotation.JsonProperty; - -public class CatAllOf { - - @ApiModelProperty(value = "") - private Boolean declawed; - /** - * Get declawed - * @return declawed - **/ - @JsonProperty("declawed") - public Boolean getDeclawed() { - return declawed; - } - - public void setDeclawed(Boolean declawed) { - this.declawed = declawed; - } - - public CatAllOf declawed(Boolean declawed) { - this.declawed = declawed; - return this; - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CatAllOf {\n"); - - sb.append(" declawed: ").append(toIndentedString(declawed)).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 static String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/Category.java b/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/Category.java deleted file mode 100644 index 2fbcc46343d..00000000000 --- a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/Category.java +++ /dev/null @@ -1,80 +0,0 @@ -package org.openapitools.model; - - -import io.swagger.annotations.ApiModelProperty; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import com.fasterxml.jackson.annotation.JsonProperty; - -public class Category { - - @ApiModelProperty(value = "") - private Long id; - - @ApiModelProperty(required = true, value = "") - private String name = "default-name"; - /** - * Get id - * @return id - **/ - @JsonProperty("id") - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public Category id(Long id) { - this.id = id; - return this; - } - - /** - * Get name - * @return name - **/ - @JsonProperty("name") - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public Category name(String name) { - this.name = name; - return this; - } - - - @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 static String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/ClassModel.java b/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/ClassModel.java deleted file mode 100644 index 492c50b313c..00000000000 --- a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/ClassModel.java +++ /dev/null @@ -1,63 +0,0 @@ -package org.openapitools.model; - -import io.swagger.annotations.ApiModel; - -import io.swagger.annotations.ApiModelProperty; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Model for testing model with \"_class\" property - **/ -@ApiModel(description="Model for testing model with \"_class\" property") -public class ClassModel { - - @ApiModelProperty(value = "") - private String propertyClass; - /** - * Get propertyClass - * @return propertyClass - **/ - @JsonProperty("_class") - public String getPropertyClass() { - return propertyClass; - } - - public void setPropertyClass(String propertyClass) { - this.propertyClass = propertyClass; - } - - public ClassModel propertyClass(String propertyClass) { - this.propertyClass = propertyClass; - return this; - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ClassModel {\n"); - - sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).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 static String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/Client.java b/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/Client.java deleted file mode 100644 index dc64a9a708e..00000000000 --- a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/Client.java +++ /dev/null @@ -1,58 +0,0 @@ -package org.openapitools.model; - - -import io.swagger.annotations.ApiModelProperty; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import com.fasterxml.jackson.annotation.JsonProperty; - -public class Client { - - @ApiModelProperty(value = "") - private String client; - /** - * Get client - * @return client - **/ - @JsonProperty("client") - public String getClient() { - return client; - } - - public void setClient(String client) { - this.client = client; - } - - public Client client(String client) { - this.client = client; - return this; - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Client {\n"); - - sb.append(" client: ").append(toIndentedString(client)).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 static String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/Dog.java b/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/Dog.java deleted file mode 100644 index 900b3643764..00000000000 --- a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/Dog.java +++ /dev/null @@ -1,60 +0,0 @@ -package org.openapitools.model; - -import org.openapitools.model.Animal; -import org.openapitools.model.DogAllOf; - -import io.swagger.annotations.ApiModelProperty; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import com.fasterxml.jackson.annotation.JsonProperty; - -public class Dog extends Animal { - - @ApiModelProperty(value = "") - private String breed; - /** - * Get breed - * @return breed - **/ - @JsonProperty("breed") - public String getBreed() { - return breed; - } - - public void setBreed(String breed) { - this.breed = breed; - } - - public Dog breed(String breed) { - this.breed = breed; - return this; - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Dog {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" breed: ").append(toIndentedString(breed)).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 static String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/DogAllOf.java b/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/DogAllOf.java deleted file mode 100644 index 2bbc5648d5a..00000000000 --- a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/DogAllOf.java +++ /dev/null @@ -1,58 +0,0 @@ -package org.openapitools.model; - - -import io.swagger.annotations.ApiModelProperty; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import com.fasterxml.jackson.annotation.JsonProperty; - -public class DogAllOf { - - @ApiModelProperty(value = "") - private String breed; - /** - * Get breed - * @return breed - **/ - @JsonProperty("breed") - public String getBreed() { - return breed; - } - - public void setBreed(String breed) { - this.breed = breed; - } - - public DogAllOf breed(String breed) { - this.breed = breed; - return this; - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DogAllOf {\n"); - - sb.append(" breed: ").append(toIndentedString(breed)).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 static String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/EnumArrays.java b/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/EnumArrays.java deleted file mode 100644 index bb666614bfe..00000000000 --- a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/EnumArrays.java +++ /dev/null @@ -1,160 +0,0 @@ -package org.openapitools.model; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.ArrayList; -import java.util.List; - -import io.swagger.annotations.ApiModelProperty; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import com.fasterxml.jackson.annotation.JsonProperty; - -public class EnumArrays { - -@XmlType(name="JustSymbolEnum") -@XmlEnum(String.class) -public enum JustSymbolEnum { - -@XmlEnumValue(">=") GREATER_THAN_OR_EQUAL_TO(String.valueOf(">=")), @XmlEnumValue("$") DOLLAR(String.valueOf("$")); - - - private String value; - - JustSymbolEnum (String v) { - value = v; - } - - public String value() { - return value; - } - - @Override - @JsonValue - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static JustSymbolEnum fromValue(String value) { - for (JustSymbolEnum b : JustSymbolEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} - - @ApiModelProperty(value = "") - private JustSymbolEnum justSymbol; - -@XmlType(name="ArrayEnumEnum") -@XmlEnum(String.class) -public enum ArrayEnumEnum { - -@XmlEnumValue("fish") FISH(String.valueOf("fish")), @XmlEnumValue("crab") CRAB(String.valueOf("crab")); - - - private String value; - - ArrayEnumEnum (String v) { - value = v; - } - - public String value() { - return value; - } - - @Override - @JsonValue - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static ArrayEnumEnum fromValue(String value) { - for (ArrayEnumEnum b : ArrayEnumEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} - - @ApiModelProperty(value = "") - private List arrayEnum = null; - /** - * Get justSymbol - * @return justSymbol - **/ - @JsonProperty("just_symbol") - public String getJustSymbol() { - if (justSymbol == null) { - return null; - } - return justSymbol.value(); - } - - public void setJustSymbol(JustSymbolEnum justSymbol) { - this.justSymbol = justSymbol; - } - - public EnumArrays justSymbol(JustSymbolEnum justSymbol) { - this.justSymbol = justSymbol; - return this; - } - - /** - * Get arrayEnum - * @return arrayEnum - **/ - @JsonProperty("array_enum") - public List getArrayEnum() { - return arrayEnum; - } - - public void setArrayEnum(List arrayEnum) { - this.arrayEnum = arrayEnum; - } - - public EnumArrays arrayEnum(List arrayEnum) { - this.arrayEnum = arrayEnum; - return this; - } - - public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { - this.arrayEnum.add(arrayEnumItem); - return this; - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class EnumArrays {\n"); - - sb.append(" justSymbol: ").append(toIndentedString(justSymbol)).append("\n"); - sb.append(" arrayEnum: ").append(toIndentedString(arrayEnum)).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 static String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/EnumClass.java b/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/EnumClass.java deleted file mode 100644 index 0c2b8541f88..00000000000 --- a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/EnumClass.java +++ /dev/null @@ -1,41 +0,0 @@ -package org.openapitools.model; - - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Gets or Sets EnumClass - */ -public enum EnumClass { - - _ABC("_abc"), - - _EFG("-efg"), - - _XYZ_("(xyz)"); - - private String value; - - EnumClass(String value) { - this.value = value; - } - - @Override - @JsonValue - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static EnumClass fromValue(String value) { - for (EnumClass b : EnumClass.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - -} - diff --git a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/EnumTest.java b/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/EnumTest.java deleted file mode 100644 index 063aec42077..00000000000 --- a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/EnumTest.java +++ /dev/null @@ -1,381 +0,0 @@ -package org.openapitools.model; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonValue; -import org.openapitools.jackson.nullable.JsonNullable; -import org.openapitools.model.OuterEnum; -import org.openapitools.model.OuterEnumDefaultValue; -import org.openapitools.model.OuterEnumInteger; -import org.openapitools.model.OuterEnumIntegerDefaultValue; - -import io.swagger.annotations.ApiModelProperty; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import com.fasterxml.jackson.annotation.JsonProperty; - -public class EnumTest { - -@XmlType(name="EnumStringEnum") -@XmlEnum(String.class) -public enum EnumStringEnum { - -@XmlEnumValue("UPPER") UPPER(String.valueOf("UPPER")), @XmlEnumValue("lower") LOWER(String.valueOf("lower")), @XmlEnumValue("") EMPTY(String.valueOf("")); - - - private String value; - - EnumStringEnum (String v) { - value = v; - } - - public String value() { - return value; - } - - @Override - @JsonValue - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static EnumStringEnum fromValue(String value) { - for (EnumStringEnum b : EnumStringEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} - - @ApiModelProperty(value = "") - private EnumStringEnum enumString; - -@XmlType(name="EnumStringRequiredEnum") -@XmlEnum(String.class) -public enum EnumStringRequiredEnum { - -@XmlEnumValue("UPPER") UPPER(String.valueOf("UPPER")), @XmlEnumValue("lower") LOWER(String.valueOf("lower")), @XmlEnumValue("") EMPTY(String.valueOf("")); - - - private String value; - - EnumStringRequiredEnum (String v) { - value = v; - } - - public String value() { - return value; - } - - @Override - @JsonValue - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static EnumStringRequiredEnum fromValue(String value) { - for (EnumStringRequiredEnum b : EnumStringRequiredEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} - - @ApiModelProperty(required = true, value = "") - private EnumStringRequiredEnum enumStringRequired; - -@XmlType(name="EnumIntegerEnum") -@XmlEnum(Integer.class) -public enum EnumIntegerEnum { - -@XmlEnumValue("1") NUMBER_1(Integer.valueOf(1)), @XmlEnumValue("-1") NUMBER_MINUS_1(Integer.valueOf(-1)); - - - private Integer value; - - EnumIntegerEnum (Integer v) { - value = v; - } - - public Integer value() { - return value; - } - - @Override - @JsonValue - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static EnumIntegerEnum fromValue(Integer value) { - for (EnumIntegerEnum b : EnumIntegerEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} - - @ApiModelProperty(value = "") - private EnumIntegerEnum enumInteger; - -@XmlType(name="EnumNumberEnum") -@XmlEnum(Double.class) -public enum EnumNumberEnum { - -@XmlEnumValue("1.1") NUMBER_1_DOT_1(Double.valueOf(1.1)), @XmlEnumValue("-1.2") NUMBER_MINUS_1_DOT_2(Double.valueOf(-1.2)); - - - private Double value; - - EnumNumberEnum (Double v) { - value = v; - } - - public Double value() { - return value; - } - - @Override - @JsonValue - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static EnumNumberEnum fromValue(Double value) { - for (EnumNumberEnum b : EnumNumberEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} - - @ApiModelProperty(value = "") - private EnumNumberEnum enumNumber; - - @ApiModelProperty(value = "") - private JsonNullable outerEnum = JsonNullable.undefined(); - - @ApiModelProperty(value = "") - private OuterEnumInteger outerEnumInteger; - - @ApiModelProperty(value = "") - private OuterEnumDefaultValue outerEnumDefaultValue = OuterEnumDefaultValue.PLACED; - - @ApiModelProperty(value = "") - private OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue = OuterEnumIntegerDefaultValue.NUMBER_0; - /** - * Get enumString - * @return enumString - **/ - @JsonProperty("enum_string") - public String getEnumString() { - if (enumString == null) { - return null; - } - return enumString.value(); - } - - public void setEnumString(EnumStringEnum enumString) { - this.enumString = enumString; - } - - public EnumTest enumString(EnumStringEnum enumString) { - this.enumString = enumString; - return this; - } - - /** - * Get enumStringRequired - * @return enumStringRequired - **/ - @JsonProperty("enum_string_required") - public String getEnumStringRequired() { - if (enumStringRequired == null) { - return null; - } - return enumStringRequired.value(); - } - - public void setEnumStringRequired(EnumStringRequiredEnum enumStringRequired) { - this.enumStringRequired = enumStringRequired; - } - - public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { - this.enumStringRequired = enumStringRequired; - return this; - } - - /** - * Get enumInteger - * @return enumInteger - **/ - @JsonProperty("enum_integer") - public Integer getEnumInteger() { - if (enumInteger == null) { - return null; - } - return enumInteger.value(); - } - - public void setEnumInteger(EnumIntegerEnum enumInteger) { - this.enumInteger = enumInteger; - } - - public EnumTest enumInteger(EnumIntegerEnum enumInteger) { - this.enumInteger = enumInteger; - return this; - } - - /** - * Get enumNumber - * @return enumNumber - **/ - @JsonProperty("enum_number") - public Double getEnumNumber() { - if (enumNumber == null) { - return null; - } - return enumNumber.value(); - } - - public void setEnumNumber(EnumNumberEnum enumNumber) { - this.enumNumber = enumNumber; - } - - public EnumTest enumNumber(EnumNumberEnum enumNumber) { - this.enumNumber = enumNumber; - return this; - } - - /** - * Get outerEnum - * @return outerEnum - **/ - @JsonIgnore - public OuterEnum getOuterEnum() { - if (outerEnum == null) { - return null; - } - return outerEnum.orElse(null); - } - - @JsonProperty("outerEnum") - public JsonNullable getOuterEnum_JsonNullable() { - return outerEnum; - } - - public void setOuterEnum(OuterEnum outerEnum) { - this.outerEnum = JsonNullable.of(outerEnum); - } - - @JsonProperty("outerEnum") - public void setOuterEnum_JsonNullable(JsonNullable outerEnum) { - this.outerEnum = outerEnum; - } - - public EnumTest outerEnum(OuterEnum outerEnum) { - this.outerEnum = JsonNullable.of(outerEnum); - return this; - } - - /** - * Get outerEnumInteger - * @return outerEnumInteger - **/ - @JsonProperty("outerEnumInteger") - public OuterEnumInteger getOuterEnumInteger() { - return outerEnumInteger; - } - - public void setOuterEnumInteger(OuterEnumInteger outerEnumInteger) { - this.outerEnumInteger = outerEnumInteger; - } - - public EnumTest outerEnumInteger(OuterEnumInteger outerEnumInteger) { - this.outerEnumInteger = outerEnumInteger; - return this; - } - - /** - * Get outerEnumDefaultValue - * @return outerEnumDefaultValue - **/ - @JsonProperty("outerEnumDefaultValue") - public OuterEnumDefaultValue getOuterEnumDefaultValue() { - return outerEnumDefaultValue; - } - - public void setOuterEnumDefaultValue(OuterEnumDefaultValue outerEnumDefaultValue) { - this.outerEnumDefaultValue = outerEnumDefaultValue; - } - - public EnumTest outerEnumDefaultValue(OuterEnumDefaultValue outerEnumDefaultValue) { - this.outerEnumDefaultValue = outerEnumDefaultValue; - return this; - } - - /** - * Get outerEnumIntegerDefaultValue - * @return outerEnumIntegerDefaultValue - **/ - @JsonProperty("outerEnumIntegerDefaultValue") - public OuterEnumIntegerDefaultValue getOuterEnumIntegerDefaultValue() { - return outerEnumIntegerDefaultValue; - } - - public void setOuterEnumIntegerDefaultValue(OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue) { - this.outerEnumIntegerDefaultValue = outerEnumIntegerDefaultValue; - } - - public EnumTest outerEnumIntegerDefaultValue(OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue) { - this.outerEnumIntegerDefaultValue = outerEnumIntegerDefaultValue; - return this; - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class EnumTest {\n"); - - sb.append(" enumString: ").append(toIndentedString(enumString)).append("\n"); - sb.append(" enumStringRequired: ").append(toIndentedString(enumStringRequired)).append("\n"); - sb.append(" enumInteger: ").append(toIndentedString(enumInteger)).append("\n"); - sb.append(" enumNumber: ").append(toIndentedString(enumNumber)).append("\n"); - sb.append(" outerEnum: ").append(toIndentedString(outerEnum)).append("\n"); - sb.append(" outerEnumInteger: ").append(toIndentedString(outerEnumInteger)).append("\n"); - sb.append(" outerEnumDefaultValue: ").append(toIndentedString(outerEnumDefaultValue)).append("\n"); - sb.append(" outerEnumIntegerDefaultValue: ").append(toIndentedString(outerEnumIntegerDefaultValue)).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 static String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/FileSchemaTestClass.java b/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/FileSchemaTestClass.java deleted file mode 100644 index f712f5f21fd..00000000000 --- a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/FileSchemaTestClass.java +++ /dev/null @@ -1,87 +0,0 @@ -package org.openapitools.model; - -import java.util.ArrayList; -import java.util.List; - -import io.swagger.annotations.ApiModelProperty; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import com.fasterxml.jackson.annotation.JsonProperty; - -public class FileSchemaTestClass { - - @ApiModelProperty(value = "") - private java.io.File file; - - @ApiModelProperty(value = "") - private List files = null; - /** - * Get file - * @return file - **/ - @JsonProperty("file") - public java.io.File getFile() { - return file; - } - - public void setFile(java.io.File file) { - this.file = file; - } - - public FileSchemaTestClass file(java.io.File file) { - this.file = file; - return this; - } - - /** - * Get files - * @return files - **/ - @JsonProperty("files") - public List getFiles() { - return files; - } - - public void setFiles(List files) { - this.files = files; - } - - public FileSchemaTestClass files(List files) { - this.files = files; - return this; - } - - public FileSchemaTestClass addFilesItem(java.io.File filesItem) { - this.files.add(filesItem); - return this; - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FileSchemaTestClass {\n"); - - sb.append(" file: ").append(toIndentedString(file)).append("\n"); - sb.append(" files: ").append(toIndentedString(files)).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 static String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/Foo.java b/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/Foo.java deleted file mode 100644 index faf5d868e28..00000000000 --- a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/Foo.java +++ /dev/null @@ -1,58 +0,0 @@ -package org.openapitools.model; - - -import io.swagger.annotations.ApiModelProperty; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import com.fasterxml.jackson.annotation.JsonProperty; - -public class Foo { - - @ApiModelProperty(value = "") - private String bar = "bar"; - /** - * Get bar - * @return bar - **/ - @JsonProperty("bar") - public String getBar() { - return bar; - } - - public void setBar(String bar) { - this.bar = bar; - } - - public Foo bar(String bar) { - this.bar = bar; - return this; - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Foo {\n"); - - sb.append(" bar: ").append(toIndentedString(bar)).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 static String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/FormatTest.java b/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/FormatTest.java deleted file mode 100644 index 0f7e080d877..00000000000 --- a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/FormatTest.java +++ /dev/null @@ -1,409 +0,0 @@ -package org.openapitools.model; - -import java.io.File; -import java.math.BigDecimal; -import java.util.Date; -import java.util.UUID; -import org.joda.time.LocalDate; - -import io.swagger.annotations.ApiModelProperty; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import com.fasterxml.jackson.annotation.JsonProperty; - -public class FormatTest { - - @ApiModelProperty(value = "") - private Integer integer; - - @ApiModelProperty(value = "") - private Integer int32; - - @ApiModelProperty(value = "") - private Long int64; - - @ApiModelProperty(required = true, value = "") - private BigDecimal number; - - @ApiModelProperty(value = "") - private Float _float; - - @ApiModelProperty(value = "") - private Double _double; - - @ApiModelProperty(value = "") - private BigDecimal decimal; - - @ApiModelProperty(value = "") - private String string; - - @ApiModelProperty(required = true, value = "") - private byte[] _byte; - - @ApiModelProperty(value = "") - private File binary; - - @ApiModelProperty(required = true, value = "") - private LocalDate date; - - @ApiModelProperty(value = "") - private Date dateTime; - - @ApiModelProperty(example = "72f98069-206d-4f12-9f12-3d1e525a8e84", value = "") - private UUID uuid; - - @ApiModelProperty(required = true, value = "") - private String password; - - @ApiModelProperty(value = "A string that is a 10 digit number. Can have leading zeros.") - /** - * A string that is a 10 digit number. Can have leading zeros. - **/ - private String patternWithDigits; - - @ApiModelProperty(value = "A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01.") - /** - * A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. - **/ - private String patternWithDigitsAndDelimiter; - /** - * Get integer - * minimum: 10 - * maximum: 100 - * @return integer - **/ - @JsonProperty("integer") - public Integer getInteger() { - return integer; - } - - public void setInteger(Integer integer) { - this.integer = integer; - } - - public FormatTest integer(Integer integer) { - this.integer = integer; - return this; - } - - /** - * Get int32 - * minimum: 20 - * maximum: 200 - * @return int32 - **/ - @JsonProperty("int32") - public Integer getInt32() { - return int32; - } - - public void setInt32(Integer int32) { - this.int32 = int32; - } - - public FormatTest int32(Integer int32) { - this.int32 = int32; - return this; - } - - /** - * Get int64 - * @return int64 - **/ - @JsonProperty("int64") - public Long getInt64() { - return int64; - } - - public void setInt64(Long int64) { - this.int64 = int64; - } - - public FormatTest int64(Long int64) { - this.int64 = int64; - return this; - } - - /** - * Get number - * minimum: 32.1 - * maximum: 543.2 - * @return number - **/ - @JsonProperty("number") - public BigDecimal getNumber() { - return number; - } - - public void setNumber(BigDecimal number) { - this.number = number; - } - - public FormatTest number(BigDecimal number) { - this.number = number; - return this; - } - - /** - * Get _float - * minimum: 54.3 - * maximum: 987.6 - * @return _float - **/ - @JsonProperty("float") - public Float getFloat() { - return _float; - } - - public void setFloat(Float _float) { - this._float = _float; - } - - public FormatTest _float(Float _float) { - this._float = _float; - return this; - } - - /** - * Get _double - * minimum: 67.8 - * maximum: 123.4 - * @return _double - **/ - @JsonProperty("double") - public Double getDouble() { - return _double; - } - - public void setDouble(Double _double) { - this._double = _double; - } - - public FormatTest _double(Double _double) { - this._double = _double; - return this; - } - - /** - * Get decimal - * @return decimal - **/ - @JsonProperty("decimal") - public BigDecimal getDecimal() { - return decimal; - } - - public void setDecimal(BigDecimal decimal) { - this.decimal = decimal; - } - - public FormatTest decimal(BigDecimal decimal) { - this.decimal = decimal; - return this; - } - - /** - * Get string - * @return string - **/ - @JsonProperty("string") - public String getString() { - return string; - } - - public void setString(String string) { - this.string = string; - } - - public FormatTest string(String string) { - this.string = string; - return this; - } - - /** - * Get _byte - * @return _byte - **/ - @JsonProperty("byte") - public byte[] getByte() { - return _byte; - } - - public void setByte(byte[] _byte) { - this._byte = _byte; - } - - public FormatTest _byte(byte[] _byte) { - this._byte = _byte; - return this; - } - - /** - * Get binary - * @return binary - **/ - @JsonProperty("binary") - public File getBinary() { - return binary; - } - - public void setBinary(File binary) { - this.binary = binary; - } - - public FormatTest binary(File binary) { - this.binary = binary; - return this; - } - - /** - * Get date - * @return date - **/ - @JsonProperty("date") - public LocalDate getDate() { - return date; - } - - public void setDate(LocalDate date) { - this.date = date; - } - - public FormatTest date(LocalDate date) { - this.date = date; - return this; - } - - /** - * Get dateTime - * @return dateTime - **/ - @JsonProperty("dateTime") - public Date getDateTime() { - return dateTime; - } - - public void setDateTime(Date dateTime) { - this.dateTime = dateTime; - } - - public FormatTest dateTime(Date dateTime) { - this.dateTime = dateTime; - return this; - } - - /** - * Get uuid - * @return uuid - **/ - @JsonProperty("uuid") - public UUID getUuid() { - return uuid; - } - - public void setUuid(UUID uuid) { - this.uuid = uuid; - } - - public FormatTest uuid(UUID uuid) { - this.uuid = uuid; - return this; - } - - /** - * Get password - * @return password - **/ - @JsonProperty("password") - public String getPassword() { - return password; - } - - public void setPassword(String password) { - this.password = password; - } - - public FormatTest password(String password) { - this.password = password; - return this; - } - - /** - * A string that is a 10 digit number. Can have leading zeros. - * @return patternWithDigits - **/ - @JsonProperty("pattern_with_digits") - public String getPatternWithDigits() { - return patternWithDigits; - } - - public void setPatternWithDigits(String patternWithDigits) { - this.patternWithDigits = patternWithDigits; - } - - public FormatTest patternWithDigits(String patternWithDigits) { - this.patternWithDigits = patternWithDigits; - return this; - } - - /** - * A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. - * @return patternWithDigitsAndDelimiter - **/ - @JsonProperty("pattern_with_digits_and_delimiter") - public String getPatternWithDigitsAndDelimiter() { - return patternWithDigitsAndDelimiter; - } - - public void setPatternWithDigitsAndDelimiter(String patternWithDigitsAndDelimiter) { - this.patternWithDigitsAndDelimiter = patternWithDigitsAndDelimiter; - } - - public FormatTest patternWithDigitsAndDelimiter(String patternWithDigitsAndDelimiter) { - this.patternWithDigitsAndDelimiter = patternWithDigitsAndDelimiter; - return this; - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FormatTest {\n"); - - sb.append(" integer: ").append(toIndentedString(integer)).append("\n"); - sb.append(" int32: ").append(toIndentedString(int32)).append("\n"); - sb.append(" int64: ").append(toIndentedString(int64)).append("\n"); - sb.append(" number: ").append(toIndentedString(number)).append("\n"); - sb.append(" _float: ").append(toIndentedString(_float)).append("\n"); - sb.append(" _double: ").append(toIndentedString(_double)).append("\n"); - sb.append(" decimal: ").append(toIndentedString(decimal)).append("\n"); - sb.append(" string: ").append(toIndentedString(string)).append("\n"); - sb.append(" _byte: ").append(toIndentedString(_byte)).append("\n"); - sb.append(" binary: ").append(toIndentedString(binary)).append("\n"); - sb.append(" date: ").append(toIndentedString(date)).append("\n"); - sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); - sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); - sb.append(" password: ").append(toIndentedString(password)).append("\n"); - sb.append(" patternWithDigits: ").append(toIndentedString(patternWithDigits)).append("\n"); - sb.append(" patternWithDigitsAndDelimiter: ").append(toIndentedString(patternWithDigitsAndDelimiter)).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 static String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/HasOnlyReadOnly.java deleted file mode 100644 index 8b81d3c024a..00000000000 --- a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/HasOnlyReadOnly.java +++ /dev/null @@ -1,64 +0,0 @@ -package org.openapitools.model; - - -import io.swagger.annotations.ApiModelProperty; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import com.fasterxml.jackson.annotation.JsonProperty; - -public class HasOnlyReadOnly { - - @ApiModelProperty(value = "") - private String bar; - - @ApiModelProperty(value = "") - private String foo; - /** - * Get bar - * @return bar - **/ - @JsonProperty("bar") - public String getBar() { - return bar; - } - - - /** - * Get foo - * @return foo - **/ - @JsonProperty("foo") - public String getFoo() { - return foo; - } - - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class HasOnlyReadOnly {\n"); - - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); - sb.append(" foo: ").append(toIndentedString(foo)).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 static String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/HealthCheckResult.java b/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/HealthCheckResult.java deleted file mode 100644 index 3a07e9d7754..00000000000 --- a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/HealthCheckResult.java +++ /dev/null @@ -1,78 +0,0 @@ -package org.openapitools.model; - -import com.fasterxml.jackson.annotation.JsonIgnore; -import io.swagger.annotations.ApiModel; -import org.openapitools.jackson.nullable.JsonNullable; - -import io.swagger.annotations.ApiModelProperty; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model. - **/ -@ApiModel(description="Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model.") -public class HealthCheckResult { - - @ApiModelProperty(value = "") - private JsonNullable nullableMessage = JsonNullable.undefined(); - /** - * Get nullableMessage - * @return nullableMessage - **/ - @JsonIgnore - public String getNullableMessage() { - if (nullableMessage == null) { - return null; - } - return nullableMessage.orElse(null); - } - - @JsonProperty("NullableMessage") - public JsonNullable getNullableMessage_JsonNullable() { - return nullableMessage; - } - - public void setNullableMessage(String nullableMessage) { - this.nullableMessage = JsonNullable.of(nullableMessage); - } - - @JsonProperty("NullableMessage") - public void setNullableMessage_JsonNullable(JsonNullable nullableMessage) { - this.nullableMessage = nullableMessage; - } - - public HealthCheckResult nullableMessage(String nullableMessage) { - this.nullableMessage = JsonNullable.of(nullableMessage); - return this; - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class HealthCheckResult {\n"); - - sb.append(" nullableMessage: ").append(toIndentedString(nullableMessage)).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 static String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/InlineResponseDefault.java b/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/InlineResponseDefault.java deleted file mode 100644 index 1adeb42e24d..00000000000 --- a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/InlineResponseDefault.java +++ /dev/null @@ -1,59 +0,0 @@ -package org.openapitools.model; - -import org.openapitools.model.Foo; - -import io.swagger.annotations.ApiModelProperty; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import com.fasterxml.jackson.annotation.JsonProperty; - -public class InlineResponseDefault { - - @ApiModelProperty(value = "") - private Foo string; - /** - * Get string - * @return string - **/ - @JsonProperty("string") - public Foo getString() { - return string; - } - - public void setString(Foo string) { - this.string = string; - } - - public InlineResponseDefault string(Foo string) { - this.string = string; - return this; - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class InlineResponseDefault {\n"); - - sb.append(" string: ").append(toIndentedString(string)).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 static String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/MapTest.java b/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/MapTest.java deleted file mode 100644 index 982f2d89776..00000000000 --- a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/MapTest.java +++ /dev/null @@ -1,183 +0,0 @@ -package org.openapitools.model; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import io.swagger.annotations.ApiModelProperty; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import com.fasterxml.jackson.annotation.JsonProperty; - -public class MapTest { - - @ApiModelProperty(value = "") - private Map> mapMapOfString = null; - -@XmlType(name="InnerEnum") -@XmlEnum(String.class) -public enum InnerEnum { - -@XmlEnumValue("UPPER") UPPER(String.valueOf("UPPER")), @XmlEnumValue("lower") LOWER(String.valueOf("lower")); - - - private String value; - - InnerEnum (String v) { - value = v; - } - - public String value() { - return value; - } - - @Override - @JsonValue - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static InnerEnum fromValue(String value) { - for (InnerEnum b : InnerEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} - - @ApiModelProperty(value = "") - private Map mapOfEnumString = null; - - @ApiModelProperty(value = "") - private Map directMap = null; - - @ApiModelProperty(value = "") - private Map indirectMap = null; - /** - * Get mapMapOfString - * @return mapMapOfString - **/ - @JsonProperty("map_map_of_string") - public Map> getMapMapOfString() { - return mapMapOfString; - } - - public void setMapMapOfString(Map> mapMapOfString) { - this.mapMapOfString = mapMapOfString; - } - - public MapTest mapMapOfString(Map> mapMapOfString) { - this.mapMapOfString = mapMapOfString; - return this; - } - - public MapTest putMapMapOfStringItem(String key, Map mapMapOfStringItem) { - this.mapMapOfString.put(key, mapMapOfStringItem); - return this; - } - - /** - * Get mapOfEnumString - * @return mapOfEnumString - **/ - @JsonProperty("map_of_enum_string") - public Map getMapOfEnumString() { - return mapOfEnumString; - } - - public void setMapOfEnumString(Map mapOfEnumString) { - this.mapOfEnumString = mapOfEnumString; - } - - public MapTest mapOfEnumString(Map mapOfEnumString) { - this.mapOfEnumString = mapOfEnumString; - return this; - } - - public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) { - this.mapOfEnumString.put(key, mapOfEnumStringItem); - return this; - } - - /** - * Get directMap - * @return directMap - **/ - @JsonProperty("direct_map") - public Map getDirectMap() { - return directMap; - } - - public void setDirectMap(Map directMap) { - this.directMap = directMap; - } - - public MapTest directMap(Map directMap) { - this.directMap = directMap; - return this; - } - - public MapTest putDirectMapItem(String key, Boolean directMapItem) { - this.directMap.put(key, directMapItem); - return this; - } - - /** - * Get indirectMap - * @return indirectMap - **/ - @JsonProperty("indirect_map") - public Map getIndirectMap() { - return indirectMap; - } - - public void setIndirectMap(Map indirectMap) { - this.indirectMap = indirectMap; - } - - public MapTest indirectMap(Map indirectMap) { - this.indirectMap = indirectMap; - return this; - } - - public MapTest putIndirectMapItem(String key, Boolean indirectMapItem) { - this.indirectMap.put(key, indirectMapItem); - return this; - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class MapTest {\n"); - - sb.append(" mapMapOfString: ").append(toIndentedString(mapMapOfString)).append("\n"); - sb.append(" mapOfEnumString: ").append(toIndentedString(mapOfEnumString)).append("\n"); - sb.append(" directMap: ").append(toIndentedString(directMap)).append("\n"); - sb.append(" indirectMap: ").append(toIndentedString(indirectMap)).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 static String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java deleted file mode 100644 index a02f0977b23..00000000000 --- a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ /dev/null @@ -1,113 +0,0 @@ -package org.openapitools.model; - -import java.util.Date; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.UUID; -import org.openapitools.model.Animal; - -import io.swagger.annotations.ApiModelProperty; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import com.fasterxml.jackson.annotation.JsonProperty; - -public class MixedPropertiesAndAdditionalPropertiesClass { - - @ApiModelProperty(value = "") - private UUID uuid; - - @ApiModelProperty(value = "") - private Date dateTime; - - @ApiModelProperty(value = "") - private Map map = null; - /** - * Get uuid - * @return uuid - **/ - @JsonProperty("uuid") - public UUID getUuid() { - return uuid; - } - - public void setUuid(UUID uuid) { - this.uuid = uuid; - } - - public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { - this.uuid = uuid; - return this; - } - - /** - * Get dateTime - * @return dateTime - **/ - @JsonProperty("dateTime") - public Date getDateTime() { - return dateTime; - } - - public void setDateTime(Date dateTime) { - this.dateTime = dateTime; - } - - public MixedPropertiesAndAdditionalPropertiesClass dateTime(Date dateTime) { - this.dateTime = dateTime; - return this; - } - - /** - * Get map - * @return map - **/ - @JsonProperty("map") - public Map getMap() { - return map; - } - - public void setMap(Map map) { - this.map = map; - } - - public MixedPropertiesAndAdditionalPropertiesClass map(Map map) { - this.map = map; - return this; - } - - public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal mapItem) { - this.map.put(key, mapItem); - return this; - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class MixedPropertiesAndAdditionalPropertiesClass {\n"); - - sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); - sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); - sb.append(" map: ").append(toIndentedString(map)).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 static String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/Model200Response.java b/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/Model200Response.java deleted file mode 100644 index 4f83df87b82..00000000000 --- a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/Model200Response.java +++ /dev/null @@ -1,85 +0,0 @@ -package org.openapitools.model; - -import io.swagger.annotations.ApiModel; - -import io.swagger.annotations.ApiModelProperty; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Model for testing model name starting with number - **/ -@ApiModel(description="Model for testing model name starting with number") -public class Model200Response { - - @ApiModelProperty(value = "") - private Integer name; - - @ApiModelProperty(value = "") - private String propertyClass; - /** - * Get name - * @return name - **/ - @JsonProperty("name") - public Integer getName() { - return name; - } - - public void setName(Integer name) { - this.name = name; - } - - public Model200Response name(Integer name) { - this.name = name; - return this; - } - - /** - * Get propertyClass - * @return propertyClass - **/ - @JsonProperty("class") - public String getPropertyClass() { - return propertyClass; - } - - public void setPropertyClass(String propertyClass) { - this.propertyClass = propertyClass; - } - - public Model200Response propertyClass(String propertyClass) { - this.propertyClass = propertyClass; - return this; - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Model200Response {\n"); - - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).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 static String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/ModelApiResponse.java b/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/ModelApiResponse.java deleted file mode 100644 index 7c628ec80e9..00000000000 --- a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/ModelApiResponse.java +++ /dev/null @@ -1,102 +0,0 @@ -package org.openapitools.model; - - -import io.swagger.annotations.ApiModelProperty; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import com.fasterxml.jackson.annotation.JsonProperty; - -public class ModelApiResponse { - - @ApiModelProperty(value = "") - private Integer code; - - @ApiModelProperty(value = "") - private String type; - - @ApiModelProperty(value = "") - private String message; - /** - * Get code - * @return code - **/ - @JsonProperty("code") - public Integer getCode() { - return code; - } - - public void setCode(Integer code) { - this.code = code; - } - - public ModelApiResponse code(Integer code) { - this.code = code; - return this; - } - - /** - * Get type - * @return type - **/ - @JsonProperty("type") - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - public ModelApiResponse type(String type) { - this.type = type; - return this; - } - - /** - * Get message - * @return message - **/ - @JsonProperty("message") - public String getMessage() { - return message; - } - - public void setMessage(String message) { - this.message = message; - } - - public ModelApiResponse message(String message) { - this.message = message; - return this; - } - - - @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 static String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/ModelReturn.java b/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/ModelReturn.java deleted file mode 100644 index ea48b1ce7e0..00000000000 --- a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/ModelReturn.java +++ /dev/null @@ -1,63 +0,0 @@ -package org.openapitools.model; - -import io.swagger.annotations.ApiModel; - -import io.swagger.annotations.ApiModelProperty; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Model for testing reserved words - **/ -@ApiModel(description="Model for testing reserved words") -public class ModelReturn { - - @ApiModelProperty(value = "") - private Integer _return; - /** - * Get _return - * @return _return - **/ - @JsonProperty("return") - public Integer getReturn() { - return _return; - } - - public void setReturn(Integer _return) { - this._return = _return; - } - - public ModelReturn _return(Integer _return) { - this._return = _return; - return this; - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ModelReturn {\n"); - - sb.append(" _return: ").append(toIndentedString(_return)).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 static String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/Name.java b/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/Name.java deleted file mode 100644 index dab102816a5..00000000000 --- a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/Name.java +++ /dev/null @@ -1,113 +0,0 @@ -package org.openapitools.model; - -import io.swagger.annotations.ApiModel; - -import io.swagger.annotations.ApiModelProperty; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Model for testing model name same as property name - **/ -@ApiModel(description="Model for testing model name same as property name") -public class Name { - - @ApiModelProperty(required = true, value = "") - private Integer name; - - @ApiModelProperty(value = "") - private Integer snakeCase; - - @ApiModelProperty(value = "") - private String property; - - @ApiModelProperty(value = "") - private Integer _123number; - /** - * Get name - * @return name - **/ - @JsonProperty("name") - public Integer getName() { - return name; - } - - public void setName(Integer name) { - this.name = name; - } - - public Name name(Integer name) { - this.name = name; - return this; - } - - /** - * Get snakeCase - * @return snakeCase - **/ - @JsonProperty("snake_case") - public Integer getSnakeCase() { - return snakeCase; - } - - - /** - * Get property - * @return property - **/ - @JsonProperty("property") - public String getProperty() { - return property; - } - - public void setProperty(String property) { - this.property = property; - } - - public Name property(String property) { - this.property = property; - return this; - } - - /** - * Get _123number - * @return _123number - **/ - @JsonProperty("123Number") - public Integer get123number() { - return _123number; - } - - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Name {\n"); - - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" snakeCase: ").append(toIndentedString(snakeCase)).append("\n"); - sb.append(" property: ").append(toIndentedString(property)).append("\n"); - sb.append(" _123number: ").append(toIndentedString(_123number)).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 static String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/NullableClass.java b/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/NullableClass.java deleted file mode 100644 index 8f1f0c63e3a..00000000000 --- a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/NullableClass.java +++ /dev/null @@ -1,481 +0,0 @@ -package org.openapitools.model; - -import com.fasterxml.jackson.annotation.JsonIgnore; -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.Date; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import org.joda.time.LocalDate; -import org.openapitools.jackson.nullable.JsonNullable; - -import io.swagger.annotations.ApiModelProperty; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import com.fasterxml.jackson.annotation.JsonProperty; - -public class NullableClass extends HashMap { - - @ApiModelProperty(value = "") - private JsonNullable integerProp = JsonNullable.undefined(); - - @ApiModelProperty(value = "") - private JsonNullable numberProp = JsonNullable.undefined(); - - @ApiModelProperty(value = "") - private JsonNullable booleanProp = JsonNullable.undefined(); - - @ApiModelProperty(value = "") - private JsonNullable stringProp = JsonNullable.undefined(); - - @ApiModelProperty(value = "") - private JsonNullable dateProp = JsonNullable.undefined(); - - @ApiModelProperty(value = "") - private JsonNullable datetimeProp = JsonNullable.undefined(); - - @ApiModelProperty(value = "") - private JsonNullable> arrayNullableProp = JsonNullable.>undefined(); - - @ApiModelProperty(value = "") - private JsonNullable> arrayAndItemsNullableProp = JsonNullable.>undefined(); - - @ApiModelProperty(value = "") - private List arrayItemsNullable = null; - - @ApiModelProperty(value = "") - private JsonNullable> objectNullableProp = JsonNullable.>undefined(); - - @ApiModelProperty(value = "") - private JsonNullable> objectAndItemsNullableProp = JsonNullable.>undefined(); - - @ApiModelProperty(value = "") - private Map objectItemsNullable = null; - /** - * Get integerProp - * @return integerProp - **/ - @JsonIgnore - public Integer getIntegerProp() { - if (integerProp == null) { - return null; - } - return integerProp.orElse(null); - } - - @JsonProperty("integer_prop") - public JsonNullable getIntegerProp_JsonNullable() { - return integerProp; - } - - public void setIntegerProp(Integer integerProp) { - this.integerProp = JsonNullable.of(integerProp); - } - - @JsonProperty("integer_prop") - public void setIntegerProp_JsonNullable(JsonNullable integerProp) { - this.integerProp = integerProp; - } - - public NullableClass integerProp(Integer integerProp) { - this.integerProp = JsonNullable.of(integerProp); - return this; - } - - /** - * Get numberProp - * @return numberProp - **/ - @JsonIgnore - public BigDecimal getNumberProp() { - if (numberProp == null) { - return null; - } - return numberProp.orElse(null); - } - - @JsonProperty("number_prop") - public JsonNullable getNumberProp_JsonNullable() { - return numberProp; - } - - public void setNumberProp(BigDecimal numberProp) { - this.numberProp = JsonNullable.of(numberProp); - } - - @JsonProperty("number_prop") - public void setNumberProp_JsonNullable(JsonNullable numberProp) { - this.numberProp = numberProp; - } - - public NullableClass numberProp(BigDecimal numberProp) { - this.numberProp = JsonNullable.of(numberProp); - return this; - } - - /** - * Get booleanProp - * @return booleanProp - **/ - @JsonIgnore - public Boolean getBooleanProp() { - if (booleanProp == null) { - return null; - } - return booleanProp.orElse(null); - } - - @JsonProperty("boolean_prop") - public JsonNullable getBooleanProp_JsonNullable() { - return booleanProp; - } - - public void setBooleanProp(Boolean booleanProp) { - this.booleanProp = JsonNullable.of(booleanProp); - } - - @JsonProperty("boolean_prop") - public void setBooleanProp_JsonNullable(JsonNullable booleanProp) { - this.booleanProp = booleanProp; - } - - public NullableClass booleanProp(Boolean booleanProp) { - this.booleanProp = JsonNullable.of(booleanProp); - return this; - } - - /** - * Get stringProp - * @return stringProp - **/ - @JsonIgnore - public String getStringProp() { - if (stringProp == null) { - return null; - } - return stringProp.orElse(null); - } - - @JsonProperty("string_prop") - public JsonNullable getStringProp_JsonNullable() { - return stringProp; - } - - public void setStringProp(String stringProp) { - this.stringProp = JsonNullable.of(stringProp); - } - - @JsonProperty("string_prop") - public void setStringProp_JsonNullable(JsonNullable stringProp) { - this.stringProp = stringProp; - } - - public NullableClass stringProp(String stringProp) { - this.stringProp = JsonNullable.of(stringProp); - return this; - } - - /** - * Get dateProp - * @return dateProp - **/ - @JsonIgnore - public LocalDate getDateProp() { - if (dateProp == null) { - return null; - } - return dateProp.orElse(null); - } - - @JsonProperty("date_prop") - public JsonNullable getDateProp_JsonNullable() { - return dateProp; - } - - public void setDateProp(LocalDate dateProp) { - this.dateProp = JsonNullable.of(dateProp); - } - - @JsonProperty("date_prop") - public void setDateProp_JsonNullable(JsonNullable dateProp) { - this.dateProp = dateProp; - } - - public NullableClass dateProp(LocalDate dateProp) { - this.dateProp = JsonNullable.of(dateProp); - return this; - } - - /** - * Get datetimeProp - * @return datetimeProp - **/ - @JsonIgnore - public Date getDatetimeProp() { - if (datetimeProp == null) { - return null; - } - return datetimeProp.orElse(null); - } - - @JsonProperty("datetime_prop") - public JsonNullable getDatetimeProp_JsonNullable() { - return datetimeProp; - } - - public void setDatetimeProp(Date datetimeProp) { - this.datetimeProp = JsonNullable.of(datetimeProp); - } - - @JsonProperty("datetime_prop") - public void setDatetimeProp_JsonNullable(JsonNullable datetimeProp) { - this.datetimeProp = datetimeProp; - } - - public NullableClass datetimeProp(Date datetimeProp) { - this.datetimeProp = JsonNullable.of(datetimeProp); - return this; - } - - /** - * Get arrayNullableProp - * @return arrayNullableProp - **/ - @JsonIgnore - public List getArrayNullableProp() { - if (arrayNullableProp == null) { - return null; - } - return arrayNullableProp.orElse(null); - } - - @JsonProperty("array_nullable_prop") - public JsonNullable> getArrayNullableProp_JsonNullable() { - return arrayNullableProp; - } - - public void setArrayNullableProp(List arrayNullableProp) { - this.arrayNullableProp = JsonNullable.>of(arrayNullableProp); - } - - @JsonProperty("array_nullable_prop") - public void setArrayNullableProp_JsonNullable(JsonNullable> arrayNullableProp) { - this.arrayNullableProp = arrayNullableProp; - } - - public NullableClass arrayNullableProp(List arrayNullableProp) { - this.arrayNullableProp = JsonNullable.>of(arrayNullableProp); - return this; - } - - public NullableClass addArrayNullablePropItem(Object arrayNullablePropItem) { - if (this.arrayNullableProp == null || !this.arrayNullableProp.isPresent()) { - this.arrayNullableProp = JsonNullable.>of(new ArrayList()); - } - this.arrayNullableProp.get().add(arrayNullablePropItem); - return this; - } - - /** - * Get arrayAndItemsNullableProp - * @return arrayAndItemsNullableProp - **/ - @JsonIgnore - public List getArrayAndItemsNullableProp() { - if (arrayAndItemsNullableProp == null) { - return null; - } - return arrayAndItemsNullableProp.orElse(null); - } - - @JsonProperty("array_and_items_nullable_prop") - public JsonNullable> getArrayAndItemsNullableProp_JsonNullable() { - return arrayAndItemsNullableProp; - } - - public void setArrayAndItemsNullableProp(List arrayAndItemsNullableProp) { - this.arrayAndItemsNullableProp = JsonNullable.>of(arrayAndItemsNullableProp); - } - - @JsonProperty("array_and_items_nullable_prop") - public void setArrayAndItemsNullableProp_JsonNullable(JsonNullable> arrayAndItemsNullableProp) { - this.arrayAndItemsNullableProp = arrayAndItemsNullableProp; - } - - public NullableClass arrayAndItemsNullableProp(List arrayAndItemsNullableProp) { - this.arrayAndItemsNullableProp = JsonNullable.>of(arrayAndItemsNullableProp); - return this; - } - - public NullableClass addArrayAndItemsNullablePropItem(Object arrayAndItemsNullablePropItem) { - if (this.arrayAndItemsNullableProp == null || !this.arrayAndItemsNullableProp.isPresent()) { - this.arrayAndItemsNullableProp = JsonNullable.>of(new ArrayList()); - } - this.arrayAndItemsNullableProp.get().add(arrayAndItemsNullablePropItem); - return this; - } - - /** - * Get arrayItemsNullable - * @return arrayItemsNullable - **/ - @JsonProperty("array_items_nullable") - public List getArrayItemsNullable() { - return arrayItemsNullable; - } - - public void setArrayItemsNullable(List arrayItemsNullable) { - this.arrayItemsNullable = arrayItemsNullable; - } - - public NullableClass arrayItemsNullable(List arrayItemsNullable) { - this.arrayItemsNullable = arrayItemsNullable; - return this; - } - - public NullableClass addArrayItemsNullableItem(Object arrayItemsNullableItem) { - this.arrayItemsNullable.add(arrayItemsNullableItem); - return this; - } - - /** - * Get objectNullableProp - * @return objectNullableProp - **/ - @JsonIgnore - public Map getObjectNullableProp() { - if (objectNullableProp == null) { - return null; - } - return objectNullableProp.orElse(null); - } - - @JsonProperty("object_nullable_prop") - public JsonNullable> getObjectNullableProp_JsonNullable() { - return objectNullableProp; - } - - public void setObjectNullableProp(Map objectNullableProp) { - this.objectNullableProp = JsonNullable.>of(objectNullableProp); - } - - @JsonProperty("object_nullable_prop") - public void setObjectNullableProp_JsonNullable(JsonNullable> objectNullableProp) { - this.objectNullableProp = objectNullableProp; - } - - public NullableClass objectNullableProp(Map objectNullableProp) { - this.objectNullableProp = JsonNullable.>of(objectNullableProp); - return this; - } - - public NullableClass putObjectNullablePropItem(String key, Object objectNullablePropItem) { - if (this.objectNullableProp == null || !this.objectNullableProp.isPresent()) { - this.objectNullableProp = JsonNullable.>of(new HashMap()); - } - this.objectNullableProp.get().put(key, objectNullablePropItem); - return this; - } - - /** - * Get objectAndItemsNullableProp - * @return objectAndItemsNullableProp - **/ - @JsonIgnore - public Map getObjectAndItemsNullableProp() { - if (objectAndItemsNullableProp == null) { - return null; - } - return objectAndItemsNullableProp.orElse(null); - } - - @JsonProperty("object_and_items_nullable_prop") - public JsonNullable> getObjectAndItemsNullableProp_JsonNullable() { - return objectAndItemsNullableProp; - } - - public void setObjectAndItemsNullableProp(Map objectAndItemsNullableProp) { - this.objectAndItemsNullableProp = JsonNullable.>of(objectAndItemsNullableProp); - } - - @JsonProperty("object_and_items_nullable_prop") - public void setObjectAndItemsNullableProp_JsonNullable(JsonNullable> objectAndItemsNullableProp) { - this.objectAndItemsNullableProp = objectAndItemsNullableProp; - } - - public NullableClass objectAndItemsNullableProp(Map objectAndItemsNullableProp) { - this.objectAndItemsNullableProp = JsonNullable.>of(objectAndItemsNullableProp); - return this; - } - - public NullableClass putObjectAndItemsNullablePropItem(String key, Object objectAndItemsNullablePropItem) { - if (this.objectAndItemsNullableProp == null || !this.objectAndItemsNullableProp.isPresent()) { - this.objectAndItemsNullableProp = JsonNullable.>of(new HashMap()); - } - this.objectAndItemsNullableProp.get().put(key, objectAndItemsNullablePropItem); - return this; - } - - /** - * Get objectItemsNullable - * @return objectItemsNullable - **/ - @JsonProperty("object_items_nullable") - public Map getObjectItemsNullable() { - return objectItemsNullable; - } - - public void setObjectItemsNullable(Map objectItemsNullable) { - this.objectItemsNullable = objectItemsNullable; - } - - public NullableClass objectItemsNullable(Map objectItemsNullable) { - this.objectItemsNullable = objectItemsNullable; - return this; - } - - public NullableClass putObjectItemsNullableItem(String key, Object objectItemsNullableItem) { - this.objectItemsNullable.put(key, objectItemsNullableItem); - return this; - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class NullableClass {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" integerProp: ").append(toIndentedString(integerProp)).append("\n"); - sb.append(" numberProp: ").append(toIndentedString(numberProp)).append("\n"); - sb.append(" booleanProp: ").append(toIndentedString(booleanProp)).append("\n"); - sb.append(" stringProp: ").append(toIndentedString(stringProp)).append("\n"); - sb.append(" dateProp: ").append(toIndentedString(dateProp)).append("\n"); - sb.append(" datetimeProp: ").append(toIndentedString(datetimeProp)).append("\n"); - sb.append(" arrayNullableProp: ").append(toIndentedString(arrayNullableProp)).append("\n"); - sb.append(" arrayAndItemsNullableProp: ").append(toIndentedString(arrayAndItemsNullableProp)).append("\n"); - sb.append(" arrayItemsNullable: ").append(toIndentedString(arrayItemsNullable)).append("\n"); - sb.append(" objectNullableProp: ").append(toIndentedString(objectNullableProp)).append("\n"); - sb.append(" objectAndItemsNullableProp: ").append(toIndentedString(objectAndItemsNullableProp)).append("\n"); - sb.append(" objectItemsNullable: ").append(toIndentedString(objectItemsNullable)).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 static String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/NumberOnly.java b/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/NumberOnly.java deleted file mode 100644 index c59e4fc25db..00000000000 --- a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/NumberOnly.java +++ /dev/null @@ -1,59 +0,0 @@ -package org.openapitools.model; - -import java.math.BigDecimal; - -import io.swagger.annotations.ApiModelProperty; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import com.fasterxml.jackson.annotation.JsonProperty; - -public class NumberOnly { - - @ApiModelProperty(value = "") - private BigDecimal justNumber; - /** - * Get justNumber - * @return justNumber - **/ - @JsonProperty("JustNumber") - public BigDecimal getJustNumber() { - return justNumber; - } - - public void setJustNumber(BigDecimal justNumber) { - this.justNumber = justNumber; - } - - public NumberOnly justNumber(BigDecimal justNumber) { - this.justNumber = justNumber; - return this; - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class NumberOnly {\n"); - - sb.append(" justNumber: ").append(toIndentedString(justNumber)).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 static String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/Order.java b/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/Order.java deleted file mode 100644 index 6df21e42f21..00000000000 --- a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/Order.java +++ /dev/null @@ -1,211 +0,0 @@ -package org.openapitools.model; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.Date; - -import io.swagger.annotations.ApiModelProperty; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import com.fasterxml.jackson.annotation.JsonProperty; - -public class Order { - - @ApiModelProperty(value = "") - private Long id; - - @ApiModelProperty(value = "") - private Long petId; - - @ApiModelProperty(value = "") - private Integer quantity; - - @ApiModelProperty(value = "") - private Date shipDate; - -@XmlType(name="StatusEnum") -@XmlEnum(String.class) -public enum StatusEnum { - -@XmlEnumValue("placed") PLACED(String.valueOf("placed")), @XmlEnumValue("approved") APPROVED(String.valueOf("approved")), @XmlEnumValue("delivered") DELIVERED(String.valueOf("delivered")); - - - private String value; - - StatusEnum (String v) { - value = v; - } - - public String value() { - return value; - } - - @Override - @JsonValue - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static StatusEnum fromValue(String value) { - for (StatusEnum b : StatusEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} - - @ApiModelProperty(value = "Order Status") - /** - * Order Status - **/ - private StatusEnum status; - - @ApiModelProperty(value = "") - private Boolean complete = false; - /** - * Get id - * @return id - **/ - @JsonProperty("id") - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public Order id(Long id) { - this.id = id; - return this; - } - - /** - * Get petId - * @return petId - **/ - @JsonProperty("petId") - public Long getPetId() { - return petId; - } - - public void setPetId(Long petId) { - this.petId = petId; - } - - public Order petId(Long petId) { - this.petId = petId; - return this; - } - - /** - * Get quantity - * @return quantity - **/ - @JsonProperty("quantity") - public Integer getQuantity() { - return quantity; - } - - public void setQuantity(Integer quantity) { - this.quantity = quantity; - } - - public Order quantity(Integer quantity) { - this.quantity = quantity; - return this; - } - - /** - * Get shipDate - * @return shipDate - **/ - @JsonProperty("shipDate") - public Date getShipDate() { - return shipDate; - } - - public void setShipDate(Date shipDate) { - this.shipDate = shipDate; - } - - public Order shipDate(Date shipDate) { - this.shipDate = shipDate; - return this; - } - - /** - * Order Status - * @return status - **/ - @JsonProperty("status") - public String getStatus() { - if (status == null) { - return null; - } - return status.value(); - } - - public void setStatus(StatusEnum status) { - this.status = status; - } - - public Order status(StatusEnum status) { - this.status = status; - return this; - } - - /** - * Get complete - * @return complete - **/ - @JsonProperty("complete") - public Boolean getComplete() { - return complete; - } - - public void setComplete(Boolean complete) { - this.complete = complete; - } - - public Order complete(Boolean complete) { - this.complete = complete; - return this; - } - - - @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 static String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/OuterComposite.java b/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/OuterComposite.java deleted file mode 100644 index 51f1cbe8399..00000000000 --- a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/OuterComposite.java +++ /dev/null @@ -1,103 +0,0 @@ -package org.openapitools.model; - -import java.math.BigDecimal; - -import io.swagger.annotations.ApiModelProperty; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import com.fasterxml.jackson.annotation.JsonProperty; - -public class OuterComposite { - - @ApiModelProperty(value = "") - private BigDecimal myNumber; - - @ApiModelProperty(value = "") - private String myString; - - @ApiModelProperty(value = "") - private Boolean myBoolean; - /** - * Get myNumber - * @return myNumber - **/ - @JsonProperty("my_number") - public BigDecimal getMyNumber() { - return myNumber; - } - - public void setMyNumber(BigDecimal myNumber) { - this.myNumber = myNumber; - } - - public OuterComposite myNumber(BigDecimal myNumber) { - this.myNumber = myNumber; - return this; - } - - /** - * Get myString - * @return myString - **/ - @JsonProperty("my_string") - public String getMyString() { - return myString; - } - - public void setMyString(String myString) { - this.myString = myString; - } - - public OuterComposite myString(String myString) { - this.myString = myString; - return this; - } - - /** - * Get myBoolean - * @return myBoolean - **/ - @JsonProperty("my_boolean") - public Boolean getMyBoolean() { - return myBoolean; - } - - public void setMyBoolean(Boolean myBoolean) { - this.myBoolean = myBoolean; - } - - public OuterComposite myBoolean(Boolean myBoolean) { - this.myBoolean = myBoolean; - return this; - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OuterComposite {\n"); - - sb.append(" myNumber: ").append(toIndentedString(myNumber)).append("\n"); - sb.append(" myString: ").append(toIndentedString(myString)).append("\n"); - sb.append(" myBoolean: ").append(toIndentedString(myBoolean)).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 static String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/OuterEnum.java b/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/OuterEnum.java deleted file mode 100644 index 0248ef97a83..00000000000 --- a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/OuterEnum.java +++ /dev/null @@ -1,41 +0,0 @@ -package org.openapitools.model; - - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Gets or Sets OuterEnum - */ -public enum OuterEnum { - - PLACED("placed"), - - APPROVED("approved"), - - DELIVERED("delivered"); - - private String value; - - OuterEnum(String value) { - this.value = value; - } - - @Override - @JsonValue - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static OuterEnum fromValue(String value) { - for (OuterEnum b : OuterEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - return null; - } - -} - diff --git a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/OuterEnumDefaultValue.java b/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/OuterEnumDefaultValue.java deleted file mode 100644 index ccd802fdf70..00000000000 --- a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/OuterEnumDefaultValue.java +++ /dev/null @@ -1,41 +0,0 @@ -package org.openapitools.model; - - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Gets or Sets OuterEnumDefaultValue - */ -public enum OuterEnumDefaultValue { - - PLACED("placed"), - - APPROVED("approved"), - - DELIVERED("delivered"); - - private String value; - - OuterEnumDefaultValue(String value) { - this.value = value; - } - - @Override - @JsonValue - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static OuterEnumDefaultValue fromValue(String value) { - for (OuterEnumDefaultValue b : OuterEnumDefaultValue.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - -} - diff --git a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/OuterEnumInteger.java b/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/OuterEnumInteger.java deleted file mode 100644 index a54af1b06b8..00000000000 --- a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/OuterEnumInteger.java +++ /dev/null @@ -1,41 +0,0 @@ -package org.openapitools.model; - - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Gets or Sets OuterEnumInteger - */ -public enum OuterEnumInteger { - - NUMBER_0(0), - - NUMBER_1(1), - - NUMBER_2(2); - - private Integer value; - - OuterEnumInteger(Integer value) { - this.value = value; - } - - @Override - @JsonValue - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static OuterEnumInteger fromValue(Integer value) { - for (OuterEnumInteger b : OuterEnumInteger.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - -} - diff --git a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/OuterEnumIntegerDefaultValue.java b/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/OuterEnumIntegerDefaultValue.java deleted file mode 100644 index 63e001988b5..00000000000 --- a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/OuterEnumIntegerDefaultValue.java +++ /dev/null @@ -1,41 +0,0 @@ -package org.openapitools.model; - - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Gets or Sets OuterEnumIntegerDefaultValue - */ -public enum OuterEnumIntegerDefaultValue { - - NUMBER_0(0), - - NUMBER_1(1), - - NUMBER_2(2); - - private Integer value; - - OuterEnumIntegerDefaultValue(Integer value) { - this.value = value; - } - - @Override - @JsonValue - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static OuterEnumIntegerDefaultValue fromValue(Integer value) { - for (OuterEnumIntegerDefaultValue b : OuterEnumIntegerDefaultValue.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - -} - diff --git a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/Pet.java b/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/Pet.java deleted file mode 100644 index 458e399bdc8..00000000000 --- a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/Pet.java +++ /dev/null @@ -1,226 +0,0 @@ -package org.openapitools.model; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.ArrayList; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Set; -import org.openapitools.model.Category; -import org.openapitools.model.Tag; - -import io.swagger.annotations.ApiModelProperty; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import com.fasterxml.jackson.annotation.JsonProperty; - -public class Pet { - - @ApiModelProperty(value = "") - private Long id; - - @ApiModelProperty(value = "") - private Category category; - - @ApiModelProperty(example = "doggie", required = true, value = "") - private String name; - - @ApiModelProperty(required = true, value = "") - private Set photoUrls = new LinkedHashSet(); - - @ApiModelProperty(value = "") - private List tags = null; - -@XmlType(name="StatusEnum") -@XmlEnum(String.class) -public enum StatusEnum { - -@XmlEnumValue("available") AVAILABLE(String.valueOf("available")), @XmlEnumValue("pending") PENDING(String.valueOf("pending")), @XmlEnumValue("sold") SOLD(String.valueOf("sold")); - - - private String value; - - StatusEnum (String v) { - value = v; - } - - public String value() { - return value; - } - - @Override - @JsonValue - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static StatusEnum fromValue(String value) { - for (StatusEnum b : StatusEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} - - @ApiModelProperty(value = "pet status in the store") - /** - * pet status in the store - **/ - private StatusEnum status; - /** - * Get id - * @return id - **/ - @JsonProperty("id") - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public Pet id(Long id) { - this.id = id; - return this; - } - - /** - * Get category - * @return category - **/ - @JsonProperty("category") - public Category getCategory() { - return category; - } - - public void setCategory(Category category) { - this.category = category; - } - - public Pet category(Category category) { - this.category = category; - return this; - } - - /** - * Get name - * @return name - **/ - @JsonProperty("name") - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public Pet name(String name) { - this.name = name; - return this; - } - - /** - * Get photoUrls - * @return photoUrls - **/ - @JsonProperty("photoUrls") - public Set getPhotoUrls() { - return photoUrls; - } - - public void setPhotoUrls(Set photoUrls) { - this.photoUrls = photoUrls; - } - - public Pet photoUrls(Set photoUrls) { - this.photoUrls = photoUrls; - return this; - } - - public Pet addPhotoUrlsItem(String photoUrlsItem) { - this.photoUrls.add(photoUrlsItem); - return this; - } - - /** - * Get tags - * @return tags - **/ - @JsonProperty("tags") - public List getTags() { - return tags; - } - - public void setTags(List tags) { - this.tags = tags; - } - - public Pet tags(List tags) { - this.tags = tags; - return this; - } - - public Pet addTagsItem(Tag tagsItem) { - this.tags.add(tagsItem); - return this; - } - - /** - * pet status in the store - * @return status - **/ - @JsonProperty("status") - public String getStatus() { - if (status == null) { - return null; - } - return status.value(); - } - - public void setStatus(StatusEnum status) { - this.status = status; - } - - public Pet status(StatusEnum status) { - this.status = status; - return this; - } - - - @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 static String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/ReadOnlyFirst.java b/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/ReadOnlyFirst.java deleted file mode 100644 index 51d0933e4a3..00000000000 --- a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/ReadOnlyFirst.java +++ /dev/null @@ -1,72 +0,0 @@ -package org.openapitools.model; - - -import io.swagger.annotations.ApiModelProperty; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import com.fasterxml.jackson.annotation.JsonProperty; - -public class ReadOnlyFirst { - - @ApiModelProperty(value = "") - private String bar; - - @ApiModelProperty(value = "") - private String baz; - /** - * Get bar - * @return bar - **/ - @JsonProperty("bar") - public String getBar() { - return bar; - } - - - /** - * Get baz - * @return baz - **/ - @JsonProperty("baz") - public String getBaz() { - return baz; - } - - public void setBaz(String baz) { - this.baz = baz; - } - - public ReadOnlyFirst baz(String baz) { - this.baz = baz; - return this; - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReadOnlyFirst {\n"); - - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); - sb.append(" baz: ").append(toIndentedString(baz)).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 static String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/SpecialModelName.java b/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/SpecialModelName.java deleted file mode 100644 index f69d373158a..00000000000 --- a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/SpecialModelName.java +++ /dev/null @@ -1,58 +0,0 @@ -package org.openapitools.model; - - -import io.swagger.annotations.ApiModelProperty; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import com.fasterxml.jackson.annotation.JsonProperty; - -public class SpecialModelName { - - @ApiModelProperty(value = "") - private Long $specialPropertyName; - /** - * Get $specialPropertyName - * @return $specialPropertyName - **/ - @JsonProperty("$special[property.name]") - public Long get$SpecialPropertyName() { - return $specialPropertyName; - } - - public void set$SpecialPropertyName(Long $specialPropertyName) { - this.$specialPropertyName = $specialPropertyName; - } - - public SpecialModelName $specialPropertyName(Long $specialPropertyName) { - this.$specialPropertyName = $specialPropertyName; - return this; - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SpecialModelName {\n"); - - sb.append(" $specialPropertyName: ").append(toIndentedString($specialPropertyName)).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 static String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/Tag.java b/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/Tag.java deleted file mode 100644 index 794fa454925..00000000000 --- a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/Tag.java +++ /dev/null @@ -1,80 +0,0 @@ -package org.openapitools.model; - - -import io.swagger.annotations.ApiModelProperty; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import com.fasterxml.jackson.annotation.JsonProperty; - -public class Tag { - - @ApiModelProperty(value = "") - private Long id; - - @ApiModelProperty(value = "") - private String name; - /** - * Get id - * @return id - **/ - @JsonProperty("id") - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public Tag id(Long id) { - this.id = id; - return this; - } - - /** - * Get name - * @return name - **/ - @JsonProperty("name") - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public Tag name(String name) { - this.name = name; - return this; - } - - - @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 static String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/User.java b/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/User.java deleted file mode 100644 index 3c364f502ab..00000000000 --- a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/model/User.java +++ /dev/null @@ -1,215 +0,0 @@ -package org.openapitools.model; - - -import io.swagger.annotations.ApiModelProperty; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import com.fasterxml.jackson.annotation.JsonProperty; - -public class User { - - @ApiModelProperty(value = "") - private Long id; - - @ApiModelProperty(value = "") - private String username; - - @ApiModelProperty(value = "") - private String firstName; - - @ApiModelProperty(value = "") - private String lastName; - - @ApiModelProperty(value = "") - private String email; - - @ApiModelProperty(value = "") - private String password; - - @ApiModelProperty(value = "") - private String phone; - - @ApiModelProperty(value = "User Status") - /** - * User Status - **/ - private Integer userStatus; - /** - * Get id - * @return id - **/ - @JsonProperty("id") - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public User id(Long id) { - this.id = id; - return this; - } - - /** - * Get username - * @return username - **/ - @JsonProperty("username") - public String getUsername() { - return username; - } - - public void setUsername(String username) { - this.username = username; - } - - public User username(String username) { - this.username = username; - return this; - } - - /** - * Get firstName - * @return firstName - **/ - @JsonProperty("firstName") - public String getFirstName() { - return firstName; - } - - public void setFirstName(String firstName) { - this.firstName = firstName; - } - - public User firstName(String firstName) { - this.firstName = firstName; - return this; - } - - /** - * Get lastName - * @return lastName - **/ - @JsonProperty("lastName") - public String getLastName() { - return lastName; - } - - public void setLastName(String lastName) { - this.lastName = lastName; - } - - public User lastName(String lastName) { - this.lastName = lastName; - return this; - } - - /** - * Get email - * @return email - **/ - @JsonProperty("email") - public String getEmail() { - return email; - } - - public void setEmail(String email) { - this.email = email; - } - - public User email(String email) { - this.email = email; - return this; - } - - /** - * Get password - * @return password - **/ - @JsonProperty("password") - public String getPassword() { - return password; - } - - public void setPassword(String password) { - this.password = password; - } - - public User password(String password) { - this.password = password; - return this; - } - - /** - * Get phone - * @return phone - **/ - @JsonProperty("phone") - public String getPhone() { - return phone; - } - - public void setPhone(String phone) { - this.phone = phone; - } - - public User phone(String phone) { - this.phone = phone; - return this; - } - - /** - * User Status - * @return userStatus - **/ - @JsonProperty("userStatus") - public Integer getUserStatus() { - return userStatus; - } - - public void setUserStatus(Integer userStatus) { - this.userStatus = userStatus; - } - - public User userStatus(Integer userStatus) { - this.userStatus = userStatus; - return this; - } - - - @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 static String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/test/java/org/openapitools/api/AnotherFakeApiTest.java b/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/test/java/org/openapitools/api/AnotherFakeApiTest.java deleted file mode 100644 index 40b34eb3c61..00000000000 --- a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/test/java/org/openapitools/api/AnotherFakeApiTest.java +++ /dev/null @@ -1,80 +0,0 @@ -/** - * 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: \" \\ - * - * The version of the OpenAPI document: 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.api; - -import org.openapitools.model.Client; -import org.junit.Test; -import org.junit.Before; -import static org.junit.Assert.*; - -import javax.ws.rs.core.Response; -import org.apache.cxf.jaxrs.client.JAXRSClientFactory; -import org.apache.cxf.jaxrs.client.ClientConfiguration; -import org.apache.cxf.jaxrs.client.WebClient; - - -import com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - - - - -/** - * 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: \" \\ - * - * API tests for AnotherFakeApi - */ -public class AnotherFakeApiTest { - - - private AnotherFakeApi api; - - @Before - public void setup() { - JacksonJsonProvider provider = new JacksonJsonProvider(); - List providers = new ArrayList(); - providers.add(provider); - - api = JAXRSClientFactory.create("http://petstore.swagger.io:80/v2", AnotherFakeApi.class, providers); - org.apache.cxf.jaxrs.client.Client client = WebClient.client(api); - - ClientConfiguration config = WebClient.getConfig(client); - } - - - /** - * To test special tags - * - * To test special tags and operation ID starting with number - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void call123testSpecialTagsTest() { - Client client = null; - //Client response = api.call123testSpecialTags(client); - //assertNotNull(response); - // TODO: test validations - - - } - -} diff --git a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/test/java/org/openapitools/api/DefaultApiTest.java b/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/test/java/org/openapitools/api/DefaultApiTest.java deleted file mode 100644 index 27170ce4655..00000000000 --- a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/test/java/org/openapitools/api/DefaultApiTest.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * 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: \" \\ - * - * The version of the OpenAPI document: 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.api; - -import org.openapitools.model.InlineResponseDefault; -import org.junit.Test; -import org.junit.Before; -import static org.junit.Assert.*; - -import javax.ws.rs.core.Response; -import org.apache.cxf.jaxrs.client.JAXRSClientFactory; -import org.apache.cxf.jaxrs.client.ClientConfiguration; -import org.apache.cxf.jaxrs.client.WebClient; - - -import com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - - - - -/** - * 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: \" \\ - * - * API tests for DefaultApi - */ -public class DefaultApiTest { - - - private DefaultApi api; - - @Before - public void setup() { - JacksonJsonProvider provider = new JacksonJsonProvider(); - List providers = new ArrayList(); - providers.add(provider); - - api = JAXRSClientFactory.create("http://petstore.swagger.io:80/v2", DefaultApi.class, providers); - org.apache.cxf.jaxrs.client.Client client = WebClient.client(api); - - ClientConfiguration config = WebClient.getConfig(client); - } - - - /** - * @throws ApiException - * if the Api call fails - */ - @Test - public void fooGetTest() { - //InlineResponseDefault response = api.fooGet(); - //assertNotNull(response); - // TODO: test validations - - - } - -} diff --git a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/test/java/org/openapitools/api/FakeApiTest.java b/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/test/java/org/openapitools/api/FakeApiTest.java deleted file mode 100644 index 0371717f6c1..00000000000 --- a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/test/java/org/openapitools/api/FakeApiTest.java +++ /dev/null @@ -1,337 +0,0 @@ -/** - * 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: \" \\ - * - * The version of the OpenAPI document: 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.api; - -import java.math.BigDecimal; -import org.openapitools.model.Client; -import java.util.Date; -import java.io.File; -import org.openapitools.model.FileSchemaTestClass; -import org.openapitools.model.HealthCheckResult; -import org.joda.time.LocalDate; -import org.openapitools.model.OuterComposite; -import org.openapitools.model.Pet; -import org.openapitools.model.User; -import org.junit.Test; -import org.junit.Before; -import static org.junit.Assert.*; - -import javax.ws.rs.core.Response; -import org.apache.cxf.jaxrs.client.JAXRSClientFactory; -import org.apache.cxf.jaxrs.client.ClientConfiguration; -import org.apache.cxf.jaxrs.client.WebClient; - - -import com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - - - - -/** - * 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: \" \\ - * - * API tests for FakeApi - */ -public class FakeApiTest { - - - private FakeApi api; - - @Before - public void setup() { - JacksonJsonProvider provider = new JacksonJsonProvider(); - List providers = new ArrayList(); - providers.add(provider); - - api = JAXRSClientFactory.create("http://petstore.swagger.io:80/v2", FakeApi.class, providers); - org.apache.cxf.jaxrs.client.Client client = WebClient.client(api); - - ClientConfiguration config = WebClient.getConfig(client); - } - - - /** - * Health check endpoint - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void fakeHealthGetTest() { - //HealthCheckResult response = api.fakeHealthGet(); - //assertNotNull(response); - // TODO: test validations - - - } - - /** - * test http signature authentication - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void fakeHttpSignatureTestTest() { - Pet pet = null; - String query1 = null; - String header1 = null; - //api.fakeHttpSignatureTest(pet, query1, header1); - - // TODO: test validations - - - } - - /** - * @throws ApiException - * if the Api call fails - */ - @Test - public void fakeOuterBooleanSerializeTest() { - Boolean body = null; - //Boolean response = api.fakeOuterBooleanSerialize(body); - //assertNotNull(response); - // TODO: test validations - - - } - - /** - * @throws ApiException - * if the Api call fails - */ - @Test - public void fakeOuterCompositeSerializeTest() { - OuterComposite outerComposite = null; - //OuterComposite response = api.fakeOuterCompositeSerialize(outerComposite); - //assertNotNull(response); - // TODO: test validations - - - } - - /** - * @throws ApiException - * if the Api call fails - */ - @Test - public void fakeOuterNumberSerializeTest() { - BigDecimal body = null; - //BigDecimal response = api.fakeOuterNumberSerialize(body); - //assertNotNull(response); - // TODO: test validations - - - } - - /** - * @throws ApiException - * if the Api call fails - */ - @Test - public void fakeOuterStringSerializeTest() { - String body = null; - //String response = api.fakeOuterStringSerialize(body); - //assertNotNull(response); - // TODO: test validations - - - } - - /** - * @throws ApiException - * if the Api call fails - */ - @Test - public void testBodyWithFileSchemaTest() { - FileSchemaTestClass fileSchemaTestClass = null; - //api.testBodyWithFileSchema(fileSchemaTestClass); - - // TODO: test validations - - - } - - /** - * @throws ApiException - * if the Api call fails - */ - @Test - public void testBodyWithQueryParamsTest() { - String query = null; - User user = null; - //api.testBodyWithQueryParams(query, user); - - // TODO: test validations - - - } - - /** - * To test \"client\" model - * - * To test \"client\" model - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void testClientModelTest() { - Client client = null; - //Client response = api.testClientModel(client); - //assertNotNull(response); - // TODO: test validations - - - } - - /** - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - * - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void testEndpointParametersTest() { - BigDecimal number = null; - Double _double = null; - String patternWithoutDelimiter = null; - byte[] _byte = null; - Integer integer = null; - Integer int32 = null; - Long int64 = null; - Float _float = null; - String string = null; - org.apache.cxf.jaxrs.ext.multipart.Attachment binary = null; - LocalDate date = null; - Date dateTime = null; - String password = null; - String paramCallback = null; - //api.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback); - - // TODO: test validations - - - } - - /** - * To test enum parameters - * - * To test enum parameters - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void testEnumParametersTest() { - List enumHeaderStringArray = null; - String enumHeaderString = null; - List enumQueryStringArray = null; - String enumQueryString = null; - Integer enumQueryInteger = null; - Double enumQueryDouble = null; - List enumFormStringArray = null; - String enumFormString = null; - //api.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); - - // TODO: test validations - - - } - - /** - * Fake endpoint to test group parameters (optional) - * - * Fake endpoint to test group parameters (optional) - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void testGroupParametersTest() { - Integer requiredStringGroup = null; - Boolean requiredBooleanGroup = null; - Long requiredInt64Group = null; - Integer stringGroup = null; - Boolean booleanGroup = null; - Long int64Group = null; - //api.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); - - // TODO: test validations - - - } - - /** - * test inline additionalProperties - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void testInlineAdditionalPropertiesTest() { - Map requestBody = null; - //api.testInlineAdditionalProperties(requestBody); - - // TODO: test validations - - - } - - /** - * test json serialization of form data - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void testJsonFormDataTest() { - String param = null; - String param2 = null; - //api.testJsonFormData(param, param2); - - // TODO: test validations - - - } - - /** - * @throws ApiException - * if the Api call fails - */ - @Test - public void testQueryParameterCollectionFormatTest() { - List pipe = null; - List ioutil = null; - List http = null; - List url = null; - List context = null; - //api.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context); - - // TODO: test validations - - - } - -} diff --git a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/test/java/org/openapitools/api/FakeClassnameTags123ApiTest.java b/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/test/java/org/openapitools/api/FakeClassnameTags123ApiTest.java deleted file mode 100644 index cb2a07382b2..00000000000 --- a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/test/java/org/openapitools/api/FakeClassnameTags123ApiTest.java +++ /dev/null @@ -1,80 +0,0 @@ -/** - * 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: \" \\ - * - * The version of the OpenAPI document: 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.api; - -import org.openapitools.model.Client; -import org.junit.Test; -import org.junit.Before; -import static org.junit.Assert.*; - -import javax.ws.rs.core.Response; -import org.apache.cxf.jaxrs.client.JAXRSClientFactory; -import org.apache.cxf.jaxrs.client.ClientConfiguration; -import org.apache.cxf.jaxrs.client.WebClient; - - -import com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - - - - -/** - * 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: \" \\ - * - * API tests for FakeClassnameTags123Api - */ -public class FakeClassnameTags123ApiTest { - - - private FakeClassnameTags123Api api; - - @Before - public void setup() { - JacksonJsonProvider provider = new JacksonJsonProvider(); - List providers = new ArrayList(); - providers.add(provider); - - api = JAXRSClientFactory.create("http://petstore.swagger.io:80/v2", FakeClassnameTags123Api.class, providers); - org.apache.cxf.jaxrs.client.Client client = WebClient.client(api); - - ClientConfiguration config = WebClient.getConfig(client); - } - - - /** - * To test class name in snake case - * - * To test class name in snake case - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void testClassnameTest() { - Client client = null; - //Client response = api.testClassname(client); - //assertNotNull(response); - // TODO: test validations - - - } - -} diff --git a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/test/java/org/openapitools/api/PetApiTest.java b/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/test/java/org/openapitools/api/PetApiTest.java deleted file mode 100644 index 542a5ffaa6f..00000000000 --- a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/test/java/org/openapitools/api/PetApiTest.java +++ /dev/null @@ -1,222 +0,0 @@ -/** - * 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: \" \\ - * - * The version of the OpenAPI document: 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.api; - -import java.io.File; -import org.openapitools.model.ModelApiResponse; -import org.openapitools.model.Pet; -import java.util.Set; -import org.junit.Test; -import org.junit.Before; -import static org.junit.Assert.*; - -import javax.ws.rs.core.Response; -import org.apache.cxf.jaxrs.client.JAXRSClientFactory; -import org.apache.cxf.jaxrs.client.ClientConfiguration; -import org.apache.cxf.jaxrs.client.WebClient; - - -import com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - - - - -/** - * 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: \" \\ - * - * API tests for PetApi - */ -public class PetApiTest { - - - private PetApi api; - - @Before - public void setup() { - JacksonJsonProvider provider = new JacksonJsonProvider(); - List providers = new ArrayList(); - providers.add(provider); - - api = JAXRSClientFactory.create("http://petstore.swagger.io:80/v2", PetApi.class, providers); - org.apache.cxf.jaxrs.client.Client client = WebClient.client(api); - - ClientConfiguration config = WebClient.getConfig(client); - } - - - /** - * Add a new pet to the store - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void addPetTest() { - Pet pet = null; - //api.addPet(pet); - - // TODO: test validations - - - } - - /** - * Deletes a pet - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void deletePetTest() { - Long petId = null; - String apiKey = null; - //api.deletePet(petId, apiKey); - - // TODO: test validations - - - } - - /** - * Finds Pets by status - * - * Multiple status values can be provided with comma separated strings - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void findPetsByStatusTest() { - List status = null; - //List response = api.findPetsByStatus(status); - //assertNotNull(response); - // TODO: test validations - - - } - - /** - * Finds Pets by tags - * - * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void findPetsByTagsTest() { - Set tags = null; - //Set response = api.findPetsByTags(tags); - //assertNotNull(response); - // TODO: test validations - - - } - - /** - * Find pet by ID - * - * Returns a single pet - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void getPetByIdTest() { - Long petId = null; - //Pet response = api.getPetById(petId); - //assertNotNull(response); - // TODO: test validations - - - } - - /** - * Update an existing pet - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void updatePetTest() { - Pet pet = null; - //api.updatePet(pet); - - // TODO: test validations - - - } - - /** - * Updates a pet in the store with form data - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void updatePetWithFormTest() { - Long petId = null; - String name = null; - String status = null; - //api.updatePetWithForm(petId, name, status); - - // TODO: test validations - - - } - - /** - * uploads an image - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void uploadFileTest() { - Long petId = null; - String additionalMetadata = null; - org.apache.cxf.jaxrs.ext.multipart.Attachment file = null; - //ModelApiResponse response = api.uploadFile(petId, additionalMetadata, file); - //assertNotNull(response); - // TODO: test validations - - - } - - /** - * uploads an image (required) - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void uploadFileWithRequiredFileTest() { - Long petId = null; - org.apache.cxf.jaxrs.ext.multipart.Attachment requiredFile = null; - String additionalMetadata = null; - //ModelApiResponse response = api.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata); - //assertNotNull(response); - // TODO: test validations - - - } - -} diff --git a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/test/java/org/openapitools/api/StoreApiTest.java b/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/test/java/org/openapitools/api/StoreApiTest.java deleted file mode 100644 index b43b7c5b71b..00000000000 --- a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/test/java/org/openapitools/api/StoreApiTest.java +++ /dev/null @@ -1,131 +0,0 @@ -/** - * 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: \" \\ - * - * The version of the OpenAPI document: 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.api; - -import org.openapitools.model.Order; -import org.junit.Test; -import org.junit.Before; -import static org.junit.Assert.*; - -import javax.ws.rs.core.Response; -import org.apache.cxf.jaxrs.client.JAXRSClientFactory; -import org.apache.cxf.jaxrs.client.ClientConfiguration; -import org.apache.cxf.jaxrs.client.WebClient; - - -import com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - - - - -/** - * 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: \" \\ - * - * API tests for StoreApi - */ -public class StoreApiTest { - - - private StoreApi api; - - @Before - public void setup() { - JacksonJsonProvider provider = new JacksonJsonProvider(); - List providers = new ArrayList(); - providers.add(provider); - - api = JAXRSClientFactory.create("http://petstore.swagger.io:80/v2", StoreApi.class, providers); - org.apache.cxf.jaxrs.client.Client client = WebClient.client(api); - - ClientConfiguration config = WebClient.getConfig(client); - } - - - /** - * Delete purchase order by ID - * - * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void deleteOrderTest() { - String orderId = null; - //api.deleteOrder(orderId); - - // TODO: test validations - - - } - - /** - * Returns pet inventories by status - * - * Returns a map of status codes to quantities - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void getInventoryTest() { - //Map response = api.getInventory(); - //assertNotNull(response); - // TODO: test validations - - - } - - /** - * Find purchase order by ID - * - * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void getOrderByIdTest() { - Long orderId = null; - //Order response = api.getOrderById(orderId); - //assertNotNull(response); - // TODO: test validations - - - } - - /** - * Place an order for a pet - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void placeOrderTest() { - Order order = null; - //Order response = api.placeOrder(order); - //assertNotNull(response); - // TODO: test validations - - - } - -} diff --git a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/test/java/org/openapitools/api/UserApiTest.java b/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/test/java/org/openapitools/api/UserApiTest.java deleted file mode 100644 index c0fa3aa090e..00000000000 --- a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/test/java/org/openapitools/api/UserApiTest.java +++ /dev/null @@ -1,197 +0,0 @@ -/** - * 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: \" \\ - * - * The version of the OpenAPI document: 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.api; - -import org.openapitools.model.User; -import org.junit.Test; -import org.junit.Before; -import static org.junit.Assert.*; - -import javax.ws.rs.core.Response; -import org.apache.cxf.jaxrs.client.JAXRSClientFactory; -import org.apache.cxf.jaxrs.client.ClientConfiguration; -import org.apache.cxf.jaxrs.client.WebClient; - - -import com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - - - - -/** - * 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: \" \\ - * - * API tests for UserApi - */ -public class UserApiTest { - - - private UserApi api; - - @Before - public void setup() { - JacksonJsonProvider provider = new JacksonJsonProvider(); - List providers = new ArrayList(); - providers.add(provider); - - api = JAXRSClientFactory.create("http://petstore.swagger.io:80/v2", UserApi.class, providers); - org.apache.cxf.jaxrs.client.Client client = WebClient.client(api); - - ClientConfiguration config = WebClient.getConfig(client); - } - - - /** - * Create user - * - * This can only be done by the logged in user. - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void createUserTest() { - User user = null; - //api.createUser(user); - - // TODO: test validations - - - } - - /** - * Creates list of users with given input array - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void createUsersWithArrayInputTest() { - List user = null; - //api.createUsersWithArrayInput(user); - - // TODO: test validations - - - } - - /** - * Creates list of users with given input array - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void createUsersWithListInputTest() { - List user = null; - //api.createUsersWithListInput(user); - - // TODO: test validations - - - } - - /** - * Delete user - * - * This can only be done by the logged in user. - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void deleteUserTest() { - String username = null; - //api.deleteUser(username); - - // TODO: test validations - - - } - - /** - * Get user by user name - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void getUserByNameTest() { - String username = null; - //User response = api.getUserByName(username); - //assertNotNull(response); - // TODO: test validations - - - } - - /** - * Logs user into the system - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void loginUserTest() { - String username = null; - String password = null; - //String response = api.loginUser(username, password); - //assertNotNull(response); - // TODO: test validations - - - } - - /** - * Logs out current logged in user session - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void logoutUserTest() { - //api.logoutUser(); - - // TODO: test validations - - - } - - /** - * Updated user - * - * This can only be done by the logged in user. - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void updateUserTest() { - String username = null; - User user = null; - //api.updateUser(username, user); - - // TODO: test validations - - - } - -} diff --git a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/docs/CatAllOf.md b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/docs/CatAllOf.md deleted file mode 100644 index fb8883197a1..00000000000 --- a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/docs/CatAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ - -# CatAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**declawed** | **kotlin.Boolean** | | [optional] - - - diff --git a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/docs/DogAllOf.md b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/docs/DogAllOf.md deleted file mode 100644 index 6b14d5e9147..00000000000 --- a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/docs/DogAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ - -# DogAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**breed** | **kotlin.String** | | [optional] - - - diff --git a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/src/main/kotlin/org/openapitools/client/models/CatAllOf.kt b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/src/main/kotlin/org/openapitools/client/models/CatAllOf.kt deleted file mode 100644 index b3888433c7b..00000000000 --- a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/src/main/kotlin/org/openapitools/client/models/CatAllOf.kt +++ /dev/null @@ -1,32 +0,0 @@ -/** -* 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: \" \\ -* -* The version of the OpenAPI document: 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.client.models - - -import com.google.gson.annotations.SerializedName -import java.io.Serializable - -/** - * - * @param declawed - */ - -data class CatAllOf ( - @SerializedName("declawed") - val declawed: kotlin.Boolean? = null -) : Serializable { - companion object { - private const val serialVersionUID: Long = 123 - } - -} - diff --git a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/src/main/kotlin/org/openapitools/client/models/DogAllOf.kt b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/src/main/kotlin/org/openapitools/client/models/DogAllOf.kt deleted file mode 100644 index be81eda5973..00000000000 --- a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/src/main/kotlin/org/openapitools/client/models/DogAllOf.kt +++ /dev/null @@ -1,32 +0,0 @@ -/** -* 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: \" \\ -* -* The version of the OpenAPI document: 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.client.models - - -import com.google.gson.annotations.SerializedName -import java.io.Serializable - -/** - * - * @param breed - */ - -data class DogAllOf ( - @SerializedName("breed") - val breed: kotlin.String? = null -) : Serializable { - companion object { - private const val serialVersionUID: Long = 123 - } - -} - diff --git a/samples/openapi3/client/petstore/kotlin-multiplatform/docs/CatAllOf.md b/samples/openapi3/client/petstore/kotlin-multiplatform/docs/CatAllOf.md deleted file mode 100644 index fb8883197a1..00000000000 --- a/samples/openapi3/client/petstore/kotlin-multiplatform/docs/CatAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ - -# CatAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**declawed** | **kotlin.Boolean** | | [optional] - - - diff --git a/samples/openapi3/client/petstore/kotlin-multiplatform/docs/DogAllOf.md b/samples/openapi3/client/petstore/kotlin-multiplatform/docs/DogAllOf.md deleted file mode 100644 index 6b14d5e9147..00000000000 --- a/samples/openapi3/client/petstore/kotlin-multiplatform/docs/DogAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ - -# DogAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**breed** | **kotlin.String** | | [optional] - - - diff --git a/samples/openapi3/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/models/CatAllOf.kt b/samples/openapi3/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/models/CatAllOf.kt deleted file mode 100644 index 0288fffacfa..00000000000 --- a/samples/openapi3/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/models/CatAllOf.kt +++ /dev/null @@ -1,26 +0,0 @@ -/** -* 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: \" \\ -* -* The version of the OpenAPI document: 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.client.models - - -import kotlinx.serialization.* -import kotlinx.serialization.internal.CommonEnumSerializer - -/** - * - * @param declawed - */ -@Serializable -data class CatAllOf ( - @SerialName(value = "declawed") val declawed: kotlin.Boolean? = null -) - diff --git a/samples/openapi3/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/models/DogAllOf.kt b/samples/openapi3/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/models/DogAllOf.kt deleted file mode 100644 index 5371db58c81..00000000000 --- a/samples/openapi3/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/models/DogAllOf.kt +++ /dev/null @@ -1,26 +0,0 @@ -/** -* 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: \" \\ -* -* The version of the OpenAPI document: 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.client.models - - -import kotlinx.serialization.* -import kotlinx.serialization.internal.CommonEnumSerializer - -/** - * - * @param breed - */ -@Serializable -data class DogAllOf ( - @SerialName(value = "breed") val breed: kotlin.String? = null -) - diff --git a/samples/openapi3/client/petstore/kotlin/docs/CatAllOf.md b/samples/openapi3/client/petstore/kotlin/docs/CatAllOf.md deleted file mode 100644 index fb8883197a1..00000000000 --- a/samples/openapi3/client/petstore/kotlin/docs/CatAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ - -# CatAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**declawed** | **kotlin.Boolean** | | [optional] - - - diff --git a/samples/openapi3/client/petstore/kotlin/docs/DogAllOf.md b/samples/openapi3/client/petstore/kotlin/docs/DogAllOf.md deleted file mode 100644 index 6b14d5e9147..00000000000 --- a/samples/openapi3/client/petstore/kotlin/docs/DogAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ - -# DogAllOf - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**breed** | **kotlin.String** | | [optional] - - - diff --git a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/CatAllOf.kt b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/CatAllOf.kt deleted file mode 100644 index d102b00d5be..00000000000 --- a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/CatAllOf.kt +++ /dev/null @@ -1,32 +0,0 @@ -/** -* 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: \" \\ -* -* The version of the OpenAPI document: 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.client.models - - -import com.squareup.moshi.Json -import java.io.Serializable - -/** - * - * @param declawed - */ - -data class CatAllOf ( - @Json(name = "declawed") - val declawed: kotlin.Boolean? = null -) : Serializable { - companion object { - private const val serialVersionUID: Long = 123 - } - -} - diff --git a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/DogAllOf.kt b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/DogAllOf.kt deleted file mode 100644 index 2ae7ee8d6fe..00000000000 --- a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/DogAllOf.kt +++ /dev/null @@ -1,32 +0,0 @@ -/** -* 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: \" \\ -* -* The version of the OpenAPI document: 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.client.models - - -import com.squareup.moshi.Json -import java.io.Serializable - -/** - * - * @param breed - */ - -data class DogAllOf ( - @Json(name = "breed") - val breed: kotlin.String? = null -) : Serializable { - companion object { - private const val serialVersionUID: Long = 123 - } - -} - diff --git a/samples/openapi3/client/petstore/python-aiohttp/.openapi-generator/FILES b/samples/openapi3/client/petstore/python-aiohttp/.openapi-generator/FILES index 40f472090ed..64d75504f15 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/.openapi-generator/FILES +++ b/samples/openapi3/client/petstore/python-aiohttp/.openapi-generator/FILES @@ -16,7 +16,6 @@ docs/ArrayTest.md docs/BasquePig.md docs/Capitalization.md docs/Cat.md -docs/CatAllOf.md docs/Category.md docs/CircularReferenceModel.md docs/ClassModel.md @@ -26,7 +25,6 @@ docs/DanishPig.md docs/DefaultApi.md docs/DeprecatedObject.md docs/Dog.md -docs/DogAllOf.md docs/DummyModel.md docs/EnumArrays.md docs/EnumClass.md @@ -107,7 +105,6 @@ petstore_api/models/array_test.py petstore_api/models/basque_pig.py petstore_api/models/capitalization.py petstore_api/models/cat.py -petstore_api/models/cat_all_of.py petstore_api/models/category.py petstore_api/models/circular_reference_model.py petstore_api/models/class_model.py @@ -116,7 +113,6 @@ petstore_api/models/color.py petstore_api/models/danish_pig.py petstore_api/models/deprecated_object.py petstore_api/models/dog.py -petstore_api/models/dog_all_of.py petstore_api/models/dummy_model.py petstore_api/models/enum_arrays.py petstore_api/models/enum_class.py diff --git a/samples/openapi3/client/petstore/python-aiohttp/README.md b/samples/openapi3/client/petstore/python-aiohttp/README.md index 99c3ae230b2..d7190853a7a 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/README.md +++ b/samples/openapi3/client/petstore/python-aiohttp/README.md @@ -144,7 +144,6 @@ Class | Method | HTTP request | Description - [BasquePig](docs/BasquePig.md) - [Capitalization](docs/Capitalization.md) - [Cat](docs/Cat.md) - - [CatAllOf](docs/CatAllOf.md) - [Category](docs/Category.md) - [CircularReferenceModel](docs/CircularReferenceModel.md) - [ClassModel](docs/ClassModel.md) @@ -153,7 +152,6 @@ Class | Method | HTTP request | Description - [DanishPig](docs/DanishPig.md) - [DeprecatedObject](docs/DeprecatedObject.md) - [Dog](docs/Dog.md) - - [DogAllOf](docs/DogAllOf.md) - [DummyModel](docs/DummyModel.md) - [EnumArrays](docs/EnumArrays.md) - [EnumClass](docs/EnumClass.md) diff --git a/samples/openapi3/client/petstore/python-aiohttp/docs/CatAllOf.md b/samples/openapi3/client/petstore/python-aiohttp/docs/CatAllOf.md deleted file mode 100644 index dcae5facb94..00000000000 --- a/samples/openapi3/client/petstore/python-aiohttp/docs/CatAllOf.md +++ /dev/null @@ -1,28 +0,0 @@ -# CatAllOf - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**declawed** | **bool** | | [optional] - -## Example - -```python -from petstore_api.models.cat_all_of import CatAllOf - -# TODO update the JSON string below -json = "{}" -# create an instance of CatAllOf from a JSON string -cat_all_of_instance = CatAllOf.from_json(json) -# print the JSON string representation of the object -print CatAllOf.to_json() - -# convert the object into a dict -cat_all_of_dict = cat_all_of_instance.to_dict() -# create an instance of CatAllOf from a dict -cat_all_of_form_dict = cat_all_of.from_dict(cat_all_of_dict) -``` -[[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/openapi3/client/petstore/python-aiohttp/docs/DogAllOf.md b/samples/openapi3/client/petstore/python-aiohttp/docs/DogAllOf.md deleted file mode 100644 index 759bdd781b0..00000000000 --- a/samples/openapi3/client/petstore/python-aiohttp/docs/DogAllOf.md +++ /dev/null @@ -1,28 +0,0 @@ -# DogAllOf - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**breed** | **str** | | [optional] - -## Example - -```python -from petstore_api.models.dog_all_of import DogAllOf - -# TODO update the JSON string below -json = "{}" -# create an instance of DogAllOf from a JSON string -dog_all_of_instance = DogAllOf.from_json(json) -# print the JSON string representation of the object -print DogAllOf.to_json() - -# convert the object into a dict -dog_all_of_dict = dog_all_of_instance.to_dict() -# create an instance of DogAllOf from a dict -dog_all_of_form_dict = dog_all_of.from_dict(dog_all_of_dict) -``` -[[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/openapi3/client/petstore/python-aiohttp/petstore_api/__init__.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/__init__.py index b1196659ff3..7bf4645fc17 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/__init__.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/__init__.py @@ -50,7 +50,6 @@ from petstore_api.models.array_test import ArrayTest from petstore_api.models.basque_pig import BasquePig from petstore_api.models.capitalization import Capitalization from petstore_api.models.cat import Cat -from petstore_api.models.cat_all_of import CatAllOf from petstore_api.models.category import Category from petstore_api.models.circular_reference_model import CircularReferenceModel from petstore_api.models.class_model import ClassModel @@ -59,7 +58,6 @@ from petstore_api.models.color import Color from petstore_api.models.danish_pig import DanishPig from petstore_api.models.deprecated_object import DeprecatedObject from petstore_api.models.dog import Dog -from petstore_api.models.dog_all_of import DogAllOf from petstore_api.models.dummy_model import DummyModel from petstore_api.models.enum_arrays import EnumArrays from petstore_api.models.enum_class import EnumClass diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/__init__.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/__init__.py index 723ce339611..e6d743bdecb 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/__init__.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/__init__.py @@ -26,7 +26,6 @@ from petstore_api.models.array_test import ArrayTest from petstore_api.models.basque_pig import BasquePig from petstore_api.models.capitalization import Capitalization from petstore_api.models.cat import Cat -from petstore_api.models.cat_all_of import CatAllOf from petstore_api.models.category import Category from petstore_api.models.circular_reference_model import CircularReferenceModel from petstore_api.models.class_model import ClassModel @@ -35,7 +34,6 @@ from petstore_api.models.color import Color from petstore_api.models.danish_pig import DanishPig from petstore_api.models.deprecated_object import DeprecatedObject from petstore_api.models.dog import Dog -from petstore_api.models.dog_all_of import DogAllOf from petstore_api.models.dummy_model import DummyModel from petstore_api.models.enum_arrays import EnumArrays from petstore_api.models.enum_class import EnumClass diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/cat_all_of.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/cat_all_of.py deleted file mode 100644 index 1d64673d4da..00000000000 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/cat_all_of.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding: utf-8 - -""" - 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: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import Optional -from pydantic import BaseModel, StrictBool - -class CatAllOf(BaseModel): - """ - CatAllOf - """ - declawed: Optional[StrictBool] = None - __properties = ["declawed"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> CatAllOf: - """Create an instance of CatAllOf from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> CatAllOf: - """Create an instance of CatAllOf from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return CatAllOf.parse_obj(obj) - - _obj = CatAllOf.parse_obj({ - "declawed": obj.get("declawed") - }) - return _obj - diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/dog_all_of.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/dog_all_of.py deleted file mode 100644 index 5caa2492ffc..00000000000 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/dog_all_of.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding: utf-8 - -""" - 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: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import Optional -from pydantic import BaseModel, StrictStr - -class DogAllOf(BaseModel): - """ - DogAllOf - """ - breed: Optional[StrictStr] = None - __properties = ["breed"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> DogAllOf: - """Create an instance of DogAllOf from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - }, - exclude_none=True) - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> DogAllOf: - """Create an instance of DogAllOf from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return DogAllOf.parse_obj(obj) - - _obj = DogAllOf.parse_obj({ - "breed": obj.get("breed") - }) - return _obj - diff --git a/samples/openapi3/client/petstore/python-aiohttp/test/test_cat_all_of.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_cat_all_of.py deleted file mode 100644 index 486600aeb13..00000000000 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_cat_all_of.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding: utf-8 - -""" - 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: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest -import datetime - -import petstore_api -from petstore_api.models.cat_all_of import CatAllOf # noqa: E501 -from petstore_api.rest import ApiException - -class TestCatAllOf(unittest.TestCase): - """CatAllOf unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test CatAllOf - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # model = petstore_api.models.cat_all_of.CatAllOf() # noqa: E501 - if include_optional : - return CatAllOf( - declawed = True - ) - else : - return CatAllOf( - ) - - def testCatAllOf(self): - """Test CatAllOf""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python-aiohttp/test/test_dog_all_of.py b/samples/openapi3/client/petstore/python-aiohttp/test/test_dog_all_of.py deleted file mode 100644 index 02502f9ee26..00000000000 --- a/samples/openapi3/client/petstore/python-aiohttp/test/test_dog_all_of.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding: utf-8 - -""" - 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: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest -import datetime - -import petstore_api -from petstore_api.models.dog_all_of import DogAllOf # noqa: E501 -from petstore_api.rest import ApiException - -class TestDogAllOf(unittest.TestCase): - """DogAllOf unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test DogAllOf - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # model = petstore_api.models.dog_all_of.DogAllOf() # noqa: E501 - if include_optional : - return DogAllOf( - breed = '' - ) - else : - return DogAllOf( - ) - - def testDogAllOf(self): - """Test DogAllOf""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/.openapi-generator/FILES b/samples/openapi3/client/petstore/python/.openapi-generator/FILES index d9fc6efd92b..552f3254796 100755 --- a/samples/openapi3/client/petstore/python/.openapi-generator/FILES +++ b/samples/openapi3/client/petstore/python/.openapi-generator/FILES @@ -16,7 +16,6 @@ docs/ArrayTest.md docs/BasquePig.md docs/Capitalization.md docs/Cat.md -docs/CatAllOf.md docs/Category.md docs/CircularReferenceModel.md docs/ClassModel.md @@ -26,7 +25,6 @@ docs/DanishPig.md docs/DefaultApi.md docs/DeprecatedObject.md docs/Dog.md -docs/DogAllOf.md docs/DummyModel.md docs/EnumArrays.md docs/EnumClass.md @@ -107,7 +105,6 @@ petstore_api/models/array_test.py petstore_api/models/basque_pig.py petstore_api/models/capitalization.py petstore_api/models/cat.py -petstore_api/models/cat_all_of.py petstore_api/models/category.py petstore_api/models/circular_reference_model.py petstore_api/models/class_model.py @@ -116,7 +113,6 @@ petstore_api/models/color.py petstore_api/models/danish_pig.py petstore_api/models/deprecated_object.py petstore_api/models/dog.py -petstore_api/models/dog_all_of.py petstore_api/models/dummy_model.py petstore_api/models/enum_arrays.py petstore_api/models/enum_class.py diff --git a/samples/openapi3/client/petstore/python/README.md b/samples/openapi3/client/petstore/python/README.md index cea1a970c2d..68cebbb9ff2 100755 --- a/samples/openapi3/client/petstore/python/README.md +++ b/samples/openapi3/client/petstore/python/README.md @@ -144,7 +144,6 @@ Class | Method | HTTP request | Description - [BasquePig](docs/BasquePig.md) - [Capitalization](docs/Capitalization.md) - [Cat](docs/Cat.md) - - [CatAllOf](docs/CatAllOf.md) - [Category](docs/Category.md) - [CircularReferenceModel](docs/CircularReferenceModel.md) - [ClassModel](docs/ClassModel.md) @@ -153,7 +152,6 @@ Class | Method | HTTP request | Description - [DanishPig](docs/DanishPig.md) - [DeprecatedObject](docs/DeprecatedObject.md) - [Dog](docs/Dog.md) - - [DogAllOf](docs/DogAllOf.md) - [DummyModel](docs/DummyModel.md) - [EnumArrays](docs/EnumArrays.md) - [EnumClass](docs/EnumClass.md) diff --git a/samples/openapi3/client/petstore/python/docs/CatAllOf.md b/samples/openapi3/client/petstore/python/docs/CatAllOf.md deleted file mode 100755 index dcae5facb94..00000000000 --- a/samples/openapi3/client/petstore/python/docs/CatAllOf.md +++ /dev/null @@ -1,28 +0,0 @@ -# CatAllOf - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**declawed** | **bool** | | [optional] - -## Example - -```python -from petstore_api.models.cat_all_of import CatAllOf - -# TODO update the JSON string below -json = "{}" -# create an instance of CatAllOf from a JSON string -cat_all_of_instance = CatAllOf.from_json(json) -# print the JSON string representation of the object -print CatAllOf.to_json() - -# convert the object into a dict -cat_all_of_dict = cat_all_of_instance.to_dict() -# create an instance of CatAllOf from a dict -cat_all_of_form_dict = cat_all_of.from_dict(cat_all_of_dict) -``` -[[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/openapi3/client/petstore/python/docs/DogAllOf.md b/samples/openapi3/client/petstore/python/docs/DogAllOf.md deleted file mode 100755 index 759bdd781b0..00000000000 --- a/samples/openapi3/client/petstore/python/docs/DogAllOf.md +++ /dev/null @@ -1,28 +0,0 @@ -# DogAllOf - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**breed** | **str** | | [optional] - -## Example - -```python -from petstore_api.models.dog_all_of import DogAllOf - -# TODO update the JSON string below -json = "{}" -# create an instance of DogAllOf from a JSON string -dog_all_of_instance = DogAllOf.from_json(json) -# print the JSON string representation of the object -print DogAllOf.to_json() - -# convert the object into a dict -dog_all_of_dict = dog_all_of_instance.to_dict() -# create an instance of DogAllOf from a dict -dog_all_of_form_dict = dog_all_of.from_dict(dog_all_of_dict) -``` -[[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/openapi3/client/petstore/python/petstore_api/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/__init__.py index b1196659ff3..7bf4645fc17 100755 --- a/samples/openapi3/client/petstore/python/petstore_api/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/__init__.py @@ -50,7 +50,6 @@ from petstore_api.models.array_test import ArrayTest from petstore_api.models.basque_pig import BasquePig from petstore_api.models.capitalization import Capitalization from petstore_api.models.cat import Cat -from petstore_api.models.cat_all_of import CatAllOf from petstore_api.models.category import Category from petstore_api.models.circular_reference_model import CircularReferenceModel from petstore_api.models.class_model import ClassModel @@ -59,7 +58,6 @@ from petstore_api.models.color import Color from petstore_api.models.danish_pig import DanishPig from petstore_api.models.deprecated_object import DeprecatedObject from petstore_api.models.dog import Dog -from petstore_api.models.dog_all_of import DogAllOf from petstore_api.models.dummy_model import DummyModel from petstore_api.models.enum_arrays import EnumArrays from petstore_api.models.enum_class import EnumClass diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/models/__init__.py index 723ce339611..e6d743bdecb 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/__init__.py @@ -26,7 +26,6 @@ from petstore_api.models.array_test import ArrayTest from petstore_api.models.basque_pig import BasquePig from petstore_api.models.capitalization import Capitalization from petstore_api.models.cat import Cat -from petstore_api.models.cat_all_of import CatAllOf from petstore_api.models.category import Category from petstore_api.models.circular_reference_model import CircularReferenceModel from petstore_api.models.class_model import ClassModel @@ -35,7 +34,6 @@ from petstore_api.models.color import Color from petstore_api.models.danish_pig import DanishPig from petstore_api.models.deprecated_object import DeprecatedObject from petstore_api.models.dog import Dog -from petstore_api.models.dog_all_of import DogAllOf from petstore_api.models.dummy_model import DummyModel from petstore_api.models.enum_arrays import EnumArrays from petstore_api.models.enum_class import EnumClass diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/cat_all_of.py b/samples/openapi3/client/petstore/python/petstore_api/models/cat_all_of.py deleted file mode 100644 index 38dfa14c5f0..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/models/cat_all_of.py +++ /dev/null @@ -1,82 +0,0 @@ -# coding: utf-8 - -""" - 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: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import Optional -from pydantic import BaseModel, StrictBool - -class CatAllOf(BaseModel): - """ - CatAllOf - """ - declawed: Optional[StrictBool] = None - additional_properties: Dict[str, Any] = {} - __properties = ["declawed"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> CatAllOf: - """Create an instance of CatAllOf from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - "additional_properties" - }, - exclude_none=True) - # puts key-value pairs in additional_properties in the top level - if self.additional_properties is not None: - for _key, _value in self.additional_properties.items(): - _dict[_key] = _value - - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> CatAllOf: - """Create an instance of CatAllOf from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return CatAllOf.parse_obj(obj) - - _obj = CatAllOf.parse_obj({ - "declawed": obj.get("declawed") - }) - # store additional fields in additional_properties - for _key in obj.keys(): - if _key not in cls.__properties: - _obj.additional_properties[_key] = obj.get(_key) - - return _obj - diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/dog_all_of.py b/samples/openapi3/client/petstore/python/petstore_api/models/dog_all_of.py deleted file mode 100644 index 7e61359cdb1..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/models/dog_all_of.py +++ /dev/null @@ -1,82 +0,0 @@ -# coding: utf-8 - -""" - 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: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import Optional -from pydantic import BaseModel, StrictStr - -class DogAllOf(BaseModel): - """ - DogAllOf - """ - breed: Optional[StrictStr] = None - additional_properties: Dict[str, Any] = {} - __properties = ["breed"] - - class Config: - """Pydantic configuration""" - allow_population_by_field_name = True - validate_assignment = True - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.dict(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> DogAllOf: - """Create an instance of DogAllOf from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self): - """Returns the dictionary representation of the model using alias""" - _dict = self.dict(by_alias=True, - exclude={ - "additional_properties" - }, - exclude_none=True) - # puts key-value pairs in additional_properties in the top level - if self.additional_properties is not None: - for _key, _value in self.additional_properties.items(): - _dict[_key] = _value - - return _dict - - @classmethod - def from_dict(cls, obj: dict) -> DogAllOf: - """Create an instance of DogAllOf from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return DogAllOf.parse_obj(obj) - - _obj = DogAllOf.parse_obj({ - "breed": obj.get("breed") - }) - # store additional fields in additional_properties - for _key in obj.keys(): - if _key not in cls.__properties: - _obj.additional_properties[_key] = obj.get(_key) - - return _obj - diff --git a/samples/openapi3/client/petstore/python/test/test_cat_all_of.py b/samples/openapi3/client/petstore/python/test/test_cat_all_of.py deleted file mode 100644 index 4708bf8bba3..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_cat_all_of.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding: utf-8 - -""" - 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: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest -import datetime - -import petstore_api -from petstore_api.models.cat_all_of import CatAllOf # noqa: E501 -from petstore_api.rest import ApiException - -class TestCatAllOf(unittest.TestCase): - """CatAllOf unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test CatAllOf - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # model = petstore_api.models.cat_all_of.CatAllOf() # noqa: E501 - if include_optional : - return CatAllOf( - declawed = True - ) - else : - return CatAllOf( - ) - - def testCatAllOf(self): - """Test CatAllOf""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_dog_all_of.py b/samples/openapi3/client/petstore/python/test/test_dog_all_of.py deleted file mode 100644 index 44a266577a4..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_dog_all_of.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding: utf-8 - -""" - 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: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import unittest -import datetime - -import petstore_api -from petstore_api.models.dog_all_of import DogAllOf # noqa: E501 -from petstore_api.rest import ApiException - -class TestDogAllOf(unittest.TestCase): - """DogAllOf unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional): - """Test DogAllOf - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # model = petstore_api.models.dog_all_of.DogAllOf() # noqa: E501 - if include_optional : - return DogAllOf( - breed = '' - ) - else : - return DogAllOf( - ) - - def testDogAllOf(self): - """Test DogAllOf""" - inst_req_only = self.make_instance(include_optional=False) - inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/.openapi-generator/FILES b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/.openapi-generator/FILES index 5ebc7f2a19f..9446e6b0187 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/.openapi-generator/FILES +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/.openapi-generator/FILES @@ -19,16 +19,13 @@ src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java src/main/java/org/openapitools/model/ArrayOfNumberOnly.java src/main/java/org/openapitools/model/ArrayTest.java src/main/java/org/openapitools/model/BigCat.java -src/main/java/org/openapitools/model/BigCatAllOf.java src/main/java/org/openapitools/model/Capitalization.java src/main/java/org/openapitools/model/Cat.java -src/main/java/org/openapitools/model/CatAllOf.java src/main/java/org/openapitools/model/Category.java src/main/java/org/openapitools/model/ClassModel.java src/main/java/org/openapitools/model/Client.java src/main/java/org/openapitools/model/ContainerDefaultValue.java src/main/java/org/openapitools/model/Dog.java -src/main/java/org/openapitools/model/DogAllOf.java src/main/java/org/openapitools/model/EnumArrays.java src/main/java/org/openapitools/model/EnumClass.java src/main/java/org/openapitools/model/EnumTest.java diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/BigCatAllOf.java deleted file mode 100644 index bff7b148aa2..00000000000 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/BigCatAllOf.java +++ /dev/null @@ -1,125 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; -import io.swagger.v3.oas.annotations.media.Schema; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * BigCatAllOf - */ - -@JsonTypeName("BigCat_allOf") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class BigCatAllOf { - - /** - * Gets or Sets kind - */ - public enum KindEnum { - LIONS("lions"), - - TIGERS("tigers"), - - LEOPARDS("leopards"), - - JAGUARS("jaguars"); - - private String value; - - KindEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static KindEnum fromValue(String value) { - for (KindEnum b : KindEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - private KindEnum kind; - - public BigCatAllOf kind(KindEnum kind) { - this.kind = kind; - return this; - } - - /** - * Get kind - * @return kind - */ - - @Schema(name = "kind", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("kind") - public KindEnum getKind() { - return kind; - } - - public void setKind(KindEnum kind) { - this.kind = kind; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BigCatAllOf bigCatAllOf = (BigCatAllOf) o; - return Objects.equals(this.kind, bigCatAllOf.kind); - } - - @Override - public int hashCode() { - return Objects.hash(kind); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BigCatAllOf {\n"); - sb.append(" kind: ").append(toIndentedString(kind)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/CatAllOf.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/CatAllOf.java deleted file mode 100644 index 0bd8697513e..00000000000 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/CatAllOf.java +++ /dev/null @@ -1,85 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; -import io.swagger.v3.oas.annotations.media.Schema; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * CatAllOf - */ - -@JsonTypeName("Cat_allOf") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class CatAllOf { - - private Boolean declawed; - - public CatAllOf declawed(Boolean declawed) { - this.declawed = declawed; - return this; - } - - /** - * Get declawed - * @return declawed - */ - - @Schema(name = "declawed", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("declawed") - public Boolean getDeclawed() { - return declawed; - } - - public void setDeclawed(Boolean declawed) { - this.declawed = declawed; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CatAllOf catAllOf = (CatAllOf) o; - return Objects.equals(this.declawed, catAllOf.declawed); - } - - @Override - public int hashCode() { - return Objects.hash(declawed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CatAllOf {\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/DogAllOf.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/DogAllOf.java deleted file mode 100644 index 6b11905f99a..00000000000 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/DogAllOf.java +++ /dev/null @@ -1,85 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; -import io.swagger.v3.oas.annotations.media.Schema; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * DogAllOf - */ - -@JsonTypeName("Dog_allOf") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class DogAllOf { - - private String breed; - - public DogAllOf breed(String breed) { - this.breed = breed; - return this; - } - - /** - * Get breed - * @return breed - */ - - @Schema(name = "breed", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("breed") - public String getBreed() { - return breed; - } - - public void setBreed(String breed) { - this.breed = breed; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DogAllOf dogAllOf = (DogAllOf) o; - return Objects.equals(this.breed, dogAllOf.breed); - } - - @Override - public int hashCode() { - return Objects.hash(breed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DogAllOf {\n"); - sb.append(" breed: ").append(toIndentedString(breed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/.openapi-generator/FILES b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/.openapi-generator/FILES index a6a0ffe5e87..fe4c653da42 100644 --- a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/.openapi-generator/FILES +++ b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/.openapi-generator/FILES @@ -12,9 +12,7 @@ http/isomorphic-fetch.ts index.ts middleware.ts models/Cat.ts -models/CatAllOf.ts models/Dog.ts -models/DogAllOf.ts models/FilePostRequest.ts models/ObjectSerializer.ts models/PetByAge.ts diff --git a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/models/CatAllOf.ts b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/models/CatAllOf.ts deleted file mode 100644 index 049c937cadb..00000000000 --- a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/models/CatAllOf.ts +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Example - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * 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 { HttpFile } from '../http/http'; - -export class CatAllOf { - 'hunts'?: boolean; - 'age'?: number; - - static readonly discriminator: string | undefined = undefined; - - static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "hunts", - "baseName": "hunts", - "type": "boolean", - "format": "" - }, - { - "name": "age", - "baseName": "age", - "type": "number", - "format": "" - } ]; - - static getAttributeTypeMap() { - return CatAllOf.attributeTypeMap; - } - - public constructor() { - } -} - diff --git a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/models/DogAllOf.ts b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/models/DogAllOf.ts deleted file mode 100644 index 704fced815f..00000000000 --- a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/models/DogAllOf.ts +++ /dev/null @@ -1,50 +0,0 @@ -/** - * Example - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * 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 { HttpFile } from '../http/http'; - -export class DogAllOf { - 'bark'?: boolean; - 'breed'?: DogAllOfBreedEnum; - - static readonly discriminator: string | undefined = undefined; - - static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ - { - "name": "bark", - "baseName": "bark", - "type": "boolean", - "format": "" - }, - { - "name": "breed", - "baseName": "breed", - "type": "DogAllOfBreedEnum", - "format": "" - } ]; - - static getAttributeTypeMap() { - return DogAllOf.attributeTypeMap; - } - - public constructor() { - } -} - - -export enum DogAllOfBreedEnum { - Dingo = 'Dingo', - Husky = 'Husky', - Retriever = 'Retriever', - Shepherd = 'Shepherd' -} - diff --git a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/models/ObjectSerializer.ts b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/models/ObjectSerializer.ts index e726b1bbdc3..196fe6b531e 100644 --- a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/models/ObjectSerializer.ts +++ b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/models/ObjectSerializer.ts @@ -1,7 +1,5 @@ export * from '../models/Cat'; -export * from '../models/CatAllOf'; export * from '../models/Dog'; -export * from '../models/DogAllOf'; export * from '../models/FilePostRequest'; export * from '../models/PetByAge'; export * from '../models/PetByType'; @@ -9,9 +7,7 @@ export * from '../models/PetsFilteredPatchRequest'; export * from '../models/PetsPatchRequest'; import { Cat } from '../models/Cat'; -import { CatAllOf } from '../models/CatAllOf'; import { Dog , DogBreedEnum } from '../models/Dog'; -import { DogAllOf , DogAllOfBreedEnum } from '../models/DogAllOf'; import { FilePostRequest } from '../models/FilePostRequest'; import { PetByAge } from '../models/PetByAge'; import { PetByType, PetByTypePetTypeEnum } from '../models/PetByType'; @@ -39,7 +35,6 @@ const supportedMediaTypes: { [mediaType: string]: number } = { let enumsMap: Set = new Set([ "DogBreedEnum", - "DogAllOfBreedEnum", "PetByTypePetTypeEnum", "PetsFilteredPatchRequestPetTypeEnum", "PetsPatchRequestBreedEnum", @@ -47,9 +42,7 @@ let enumsMap: Set = new Set([ let typeMap: {[index: string]: any} = { "Cat": Cat, - "CatAllOf": CatAllOf, "Dog": Dog, - "DogAllOf": DogAllOf, "FilePostRequest": FilePostRequest, "PetByAge": PetByAge, "PetByType": PetByType, diff --git a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/models/all.ts b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/models/all.ts index 029557b7a2a..195ee97a007 100644 --- a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/models/all.ts +++ b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/models/all.ts @@ -1,7 +1,5 @@ export * from '../models/Cat' -export * from '../models/CatAllOf' export * from '../models/Dog' -export * from '../models/DogAllOf' export * from '../models/FilePostRequest' export * from '../models/PetByAge' export * from '../models/PetByType' diff --git a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/types/ObjectParamAPI.ts b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/types/ObjectParamAPI.ts index 073f6550336..b034e0e6d50 100644 --- a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/types/ObjectParamAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/types/ObjectParamAPI.ts @@ -2,9 +2,7 @@ import { ResponseContext, RequestContext, HttpFile } from '../http/http'; import { Configuration} from '../configuration' import { Cat } from '../models/Cat'; -import { CatAllOf } from '../models/CatAllOf'; import { Dog } from '../models/Dog'; -import { DogAllOf } from '../models/DogAllOf'; import { FilePostRequest } from '../models/FilePostRequest'; import { PetByAge } from '../models/PetByAge'; import { PetByType } from '../models/PetByType'; diff --git a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/types/ObservableAPI.ts b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/types/ObservableAPI.ts index 52b5367f4b7..e7148ec2255 100644 --- a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/types/ObservableAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/types/ObservableAPI.ts @@ -3,9 +3,7 @@ import { Configuration} from '../configuration' import { Observable, of, from } from '../rxjsStub'; import {mergeMap, map} from '../rxjsStub'; import { Cat } from '../models/Cat'; -import { CatAllOf } from '../models/CatAllOf'; import { Dog } from '../models/Dog'; -import { DogAllOf } from '../models/DogAllOf'; import { FilePostRequest } from '../models/FilePostRequest'; import { PetByAge } from '../models/PetByAge'; import { PetByType } from '../models/PetByType'; diff --git a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/types/PromiseAPI.ts b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/types/PromiseAPI.ts index a42cc756888..252c55ff3a3 100644 --- a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/types/PromiseAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/types/PromiseAPI.ts @@ -2,9 +2,7 @@ import { ResponseContext, RequestContext, HttpFile } from '../http/http'; import { Configuration} from '../configuration' import { Cat } from '../models/Cat'; -import { CatAllOf } from '../models/CatAllOf'; import { Dog } from '../models/Dog'; -import { DogAllOf } from '../models/DogAllOf'; import { FilePostRequest } from '../models/FilePostRequest'; import { PetByAge } from '../models/PetByAge'; import { PetByType } from '../models/PetByType'; diff --git a/samples/openapi3/server/petstore/springboot-delegate/.openapi-generator/FILES b/samples/openapi3/server/petstore/springboot-delegate/.openapi-generator/FILES index 50815c779dc..79b659e2679 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/.openapi-generator/FILES +++ b/samples/openapi3/server/petstore/springboot-delegate/.openapi-generator/FILES @@ -37,16 +37,13 @@ src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java src/main/java/org/openapitools/model/ArrayOfNumberOnly.java src/main/java/org/openapitools/model/ArrayTest.java src/main/java/org/openapitools/model/BigCat.java -src/main/java/org/openapitools/model/BigCatAllOf.java src/main/java/org/openapitools/model/Capitalization.java src/main/java/org/openapitools/model/Cat.java -src/main/java/org/openapitools/model/CatAllOf.java src/main/java/org/openapitools/model/Category.java src/main/java/org/openapitools/model/ClassModel.java src/main/java/org/openapitools/model/Client.java src/main/java/org/openapitools/model/ContainerDefaultValue.java src/main/java/org/openapitools/model/Dog.java -src/main/java/org/openapitools/model/DogAllOf.java src/main/java/org/openapitools/model/EnumArrays.java src/main/java/org/openapitools/model/EnumClass.java src/main/java/org/openapitools/model/EnumTest.java diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCatAllOf.java deleted file mode 100644 index bff7b148aa2..00000000000 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCatAllOf.java +++ /dev/null @@ -1,125 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; -import io.swagger.v3.oas.annotations.media.Schema; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * BigCatAllOf - */ - -@JsonTypeName("BigCat_allOf") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class BigCatAllOf { - - /** - * Gets or Sets kind - */ - public enum KindEnum { - LIONS("lions"), - - TIGERS("tigers"), - - LEOPARDS("leopards"), - - JAGUARS("jaguars"); - - private String value; - - KindEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static KindEnum fromValue(String value) { - for (KindEnum b : KindEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - private KindEnum kind; - - public BigCatAllOf kind(KindEnum kind) { - this.kind = kind; - return this; - } - - /** - * Get kind - * @return kind - */ - - @Schema(name = "kind", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("kind") - public KindEnum getKind() { - return kind; - } - - public void setKind(KindEnum kind) { - this.kind = kind; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BigCatAllOf bigCatAllOf = (BigCatAllOf) o; - return Objects.equals(this.kind, bigCatAllOf.kind); - } - - @Override - public int hashCode() { - return Objects.hash(kind); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BigCatAllOf {\n"); - sb.append(" kind: ").append(toIndentedString(kind)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/CatAllOf.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/CatAllOf.java deleted file mode 100644 index 0bd8697513e..00000000000 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/CatAllOf.java +++ /dev/null @@ -1,85 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; -import io.swagger.v3.oas.annotations.media.Schema; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * CatAllOf - */ - -@JsonTypeName("Cat_allOf") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class CatAllOf { - - private Boolean declawed; - - public CatAllOf declawed(Boolean declawed) { - this.declawed = declawed; - return this; - } - - /** - * Get declawed - * @return declawed - */ - - @Schema(name = "declawed", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("declawed") - public Boolean getDeclawed() { - return declawed; - } - - public void setDeclawed(Boolean declawed) { - this.declawed = declawed; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CatAllOf catAllOf = (CatAllOf) o; - return Objects.equals(this.declawed, catAllOf.declawed); - } - - @Override - public int hashCode() { - return Objects.hash(declawed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CatAllOf {\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/DogAllOf.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/DogAllOf.java deleted file mode 100644 index 6b11905f99a..00000000000 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/DogAllOf.java +++ /dev/null @@ -1,85 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; -import io.swagger.v3.oas.annotations.media.Schema; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * DogAllOf - */ - -@JsonTypeName("Dog_allOf") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class DogAllOf { - - private String breed; - - public DogAllOf breed(String breed) { - this.breed = breed; - return this; - } - - /** - * Get breed - * @return breed - */ - - @Schema(name = "breed", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("breed") - public String getBreed() { - return breed; - } - - public void setBreed(String breed) { - this.breed = breed; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DogAllOf dogAllOf = (DogAllOf) o; - return Objects.equals(this.breed, dogAllOf.breed); - } - - @Override - public int hashCode() { - return Objects.hash(breed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DogAllOf {\n"); - sb.append(" breed: ").append(toIndentedString(breed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/resources/openapi.yaml b/samples/openapi3/server/petstore/springboot-delegate/src/main/resources/openapi.yaml index 260abafd6ea..98f0e7e6f9d 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/resources/openapi.yaml +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/resources/openapi.yaml @@ -1439,15 +1439,29 @@ components: Dog: allOf: - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Dog_allOf' + - properties: + breed: + type: string + type: object Cat: allOf: - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Cat_allOf' + - properties: + declawed: + type: boolean + type: object BigCat: allOf: - $ref: '#/components/schemas/Cat' - - $ref: '#/components/schemas/BigCat_allOf' + - properties: + kind: + enum: + - lions + - tigers + - leopards + - jaguars + type: string + type: object Animal: discriminator: propertyName: className @@ -2290,29 +2304,6 @@ components: required: - requiredFile type: object - Dog_allOf: - properties: - breed: - type: string - type: object - example: null - Cat_allOf: - properties: - declawed: - type: boolean - type: object - example: null - BigCat_allOf: - properties: - kind: - enum: - - lions - - tigers - - leopards - - jaguars - type: string - type: object - example: null securitySchemes: petstore_auth: flows: diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/.openapi-generator/FILES b/samples/openapi3/server/petstore/springboot-implicitHeaders/.openapi-generator/FILES index c904db3800a..d1488c7ee6c 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/.openapi-generator/FILES +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/.openapi-generator/FILES @@ -31,16 +31,13 @@ src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java src/main/java/org/openapitools/model/ArrayOfNumberOnly.java src/main/java/org/openapitools/model/ArrayTest.java src/main/java/org/openapitools/model/BigCat.java -src/main/java/org/openapitools/model/BigCatAllOf.java src/main/java/org/openapitools/model/Capitalization.java src/main/java/org/openapitools/model/Cat.java -src/main/java/org/openapitools/model/CatAllOf.java src/main/java/org/openapitools/model/Category.java src/main/java/org/openapitools/model/ClassModel.java src/main/java/org/openapitools/model/Client.java src/main/java/org/openapitools/model/ContainerDefaultValue.java src/main/java/org/openapitools/model/Dog.java -src/main/java/org/openapitools/model/DogAllOf.java src/main/java/org/openapitools/model/EnumArrays.java src/main/java/org/openapitools/model/EnumClass.java src/main/java/org/openapitools/model/EnumTest.java diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/BigCatAllOf.java deleted file mode 100644 index bff7b148aa2..00000000000 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/BigCatAllOf.java +++ /dev/null @@ -1,125 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; -import io.swagger.v3.oas.annotations.media.Schema; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * BigCatAllOf - */ - -@JsonTypeName("BigCat_allOf") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class BigCatAllOf { - - /** - * Gets or Sets kind - */ - public enum KindEnum { - LIONS("lions"), - - TIGERS("tigers"), - - LEOPARDS("leopards"), - - JAGUARS("jaguars"); - - private String value; - - KindEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static KindEnum fromValue(String value) { - for (KindEnum b : KindEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - private KindEnum kind; - - public BigCatAllOf kind(KindEnum kind) { - this.kind = kind; - return this; - } - - /** - * Get kind - * @return kind - */ - - @Schema(name = "kind", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("kind") - public KindEnum getKind() { - return kind; - } - - public void setKind(KindEnum kind) { - this.kind = kind; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BigCatAllOf bigCatAllOf = (BigCatAllOf) o; - return Objects.equals(this.kind, bigCatAllOf.kind); - } - - @Override - public int hashCode() { - return Objects.hash(kind); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BigCatAllOf {\n"); - sb.append(" kind: ").append(toIndentedString(kind)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/CatAllOf.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/CatAllOf.java deleted file mode 100644 index 0bd8697513e..00000000000 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/CatAllOf.java +++ /dev/null @@ -1,85 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; -import io.swagger.v3.oas.annotations.media.Schema; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * CatAllOf - */ - -@JsonTypeName("Cat_allOf") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class CatAllOf { - - private Boolean declawed; - - public CatAllOf declawed(Boolean declawed) { - this.declawed = declawed; - return this; - } - - /** - * Get declawed - * @return declawed - */ - - @Schema(name = "declawed", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("declawed") - public Boolean getDeclawed() { - return declawed; - } - - public void setDeclawed(Boolean declawed) { - this.declawed = declawed; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CatAllOf catAllOf = (CatAllOf) o; - return Objects.equals(this.declawed, catAllOf.declawed); - } - - @Override - public int hashCode() { - return Objects.hash(declawed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CatAllOf {\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/DogAllOf.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/DogAllOf.java deleted file mode 100644 index 6b11905f99a..00000000000 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/DogAllOf.java +++ /dev/null @@ -1,85 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; -import io.swagger.v3.oas.annotations.media.Schema; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * DogAllOf - */ - -@JsonTypeName("Dog_allOf") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class DogAllOf { - - private String breed; - - public DogAllOf breed(String breed) { - this.breed = breed; - return this; - } - - /** - * Get breed - * @return breed - */ - - @Schema(name = "breed", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("breed") - public String getBreed() { - return breed; - } - - public void setBreed(String breed) { - this.breed = breed; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DogAllOf dogAllOf = (DogAllOf) o; - return Objects.equals(this.breed, dogAllOf.breed); - } - - @Override - public int hashCode() { - return Objects.hash(breed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DogAllOf {\n"); - sb.append(" breed: ").append(toIndentedString(breed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/resources/openapi.yaml b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/resources/openapi.yaml index 260abafd6ea..98f0e7e6f9d 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/resources/openapi.yaml +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/resources/openapi.yaml @@ -1439,15 +1439,29 @@ components: Dog: allOf: - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Dog_allOf' + - properties: + breed: + type: string + type: object Cat: allOf: - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Cat_allOf' + - properties: + declawed: + type: boolean + type: object BigCat: allOf: - $ref: '#/components/schemas/Cat' - - $ref: '#/components/schemas/BigCat_allOf' + - properties: + kind: + enum: + - lions + - tigers + - leopards + - jaguars + type: string + type: object Animal: discriminator: propertyName: className @@ -2290,29 +2304,6 @@ components: required: - requiredFile type: object - Dog_allOf: - properties: - breed: - type: string - type: object - example: null - Cat_allOf: - properties: - declawed: - type: boolean - type: object - example: null - BigCat_allOf: - properties: - kind: - enum: - - lions - - tigers - - leopards - - jaguars - type: string - type: object - example: null securitySchemes: petstore_auth: flows: diff --git a/samples/schema/petstore/mysql/.openapi-generator/FILES b/samples/schema/petstore/mysql/.openapi-generator/FILES index 32d5e5f3d7b..0a914acd736 100644 --- a/samples/schema/petstore/mysql/.openapi-generator/FILES +++ b/samples/schema/petstore/mysql/.openapi-generator/FILES @@ -8,13 +8,11 @@ Model/ArrayOfNumberOnly.sql Model/ArrayTest.sql Model/Capitalization.sql Model/Cat.sql -Model/CatAllOf.sql Model/Category.sql Model/ClassModel.sql Model/Client.sql Model/DeprecatedObject.sql Model/Dog.sql -Model/DogAllOf.sql Model/EnumArrays.sql Model/EnumClass.sql Model/EnumTest.sql diff --git a/samples/schema/petstore/mysql/mysql_schema.sql b/samples/schema/petstore/mysql/mysql_schema.sql index cdee918e797..46629b42730 100644 --- a/samples/schema/petstore/mysql/mysql_schema.sql +++ b/samples/schema/petstore/mysql/mysql_schema.sql @@ -101,14 +101,6 @@ CREATE TABLE IF NOT EXISTS `Cat` ( `declawed` TINYINT(1) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; --- --- Table structure for table `Cat_allOf` generated from model 'CatUnderscoreallOf' --- - -CREATE TABLE IF NOT EXISTS `Cat_allOf` ( - `declawed` TINYINT(1) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; - -- -- Table structure for table `Category` generated from model 'Category' -- @@ -153,14 +145,6 @@ CREATE TABLE IF NOT EXISTS `Dog` ( `breed` TEXT DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; --- --- Table structure for table `Dog_allOf` generated from model 'DogUnderscoreallOf' --- - -CREATE TABLE IF NOT EXISTS `Dog_allOf` ( - `breed` TEXT DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; - -- -- Table structure for table `EnumArrays` generated from model 'EnumArrays' -- diff --git a/samples/server/helidon/se/petstore-default/src/test/java/org/openapitools/server/model/CatAllOfTest.java b/samples/server/helidon/se/petstore-default/src/test/java/org/openapitools/server/model/CatAllOfTest.java deleted file mode 100644 index ab121c24d90..00000000000 --- a/samples/server/helidon/se/petstore-default/src/test/java/org/openapitools/server/model/CatAllOfTest.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.server.model; - -import com.fasterxml.jackson.annotation.JsonTypeName; -import org.junit.jupiter.api.Test; - - -/** - * Model tests for CatAllOf - */ -public class CatAllOfTest { - private final CatAllOf model = new CatAllOf(); - - /** - * Model tests for CatAllOf - */ - @Test - public void testCatAllOf() { - // TODO: test CatAllOf - } - - /** - * Test the property 'declawed' - */ - @Test - public void declawedTest() { - // TODO: test declawed - } - -} diff --git a/samples/server/helidon/se/petstore-default/src/test/java/org/openapitools/server/model/DogAllOfTest.java b/samples/server/helidon/se/petstore-default/src/test/java/org/openapitools/server/model/DogAllOfTest.java deleted file mode 100644 index 2759c9a2eb9..00000000000 --- a/samples/server/helidon/se/petstore-default/src/test/java/org/openapitools/server/model/DogAllOfTest.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.server.model; - -import com.fasterxml.jackson.annotation.JsonTypeName; -import org.junit.jupiter.api.Test; - - -/** - * Model tests for DogAllOf - */ -public class DogAllOfTest { - private final DogAllOf model = new DogAllOf(); - - /** - * Model tests for DogAllOf - */ - @Test - public void testDogAllOf() { - // TODO: test DogAllOf - } - - /** - * Test the property 'breed' - */ - @Test - public void breedTest() { - // TODO: test breed - } - -} diff --git a/samples/server/petstore/aspnetcore-3.0/.openapi-generator/FILES b/samples/server/petstore/aspnetcore-3.0/.openapi-generator/FILES index f36d2528d09..8a81b301272 100644 --- a/samples/server/petstore/aspnetcore-3.0/.openapi-generator/FILES +++ b/samples/server/petstore/aspnetcore-3.0/.openapi-generator/FILES @@ -17,10 +17,8 @@ src/Org.OpenAPITools/Formatters/InputFormatterStream.cs src/Org.OpenAPITools/Models/Animal.cs src/Org.OpenAPITools/Models/ApiResponse.cs src/Org.OpenAPITools/Models/Cat.cs -src/Org.OpenAPITools/Models/CatAllOf.cs src/Org.OpenAPITools/Models/Category.cs src/Org.OpenAPITools/Models/Dog.cs -src/Org.OpenAPITools/Models/DogAllOf.cs src/Org.OpenAPITools/Models/Order.cs src/Org.OpenAPITools/Models/Pet.cs src/Org.OpenAPITools/Models/Tag.cs diff --git a/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/wwwroot/openapi-original.json b/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/wwwroot/openapi-original.json index 53d1a8e9b10..75adab0d8b4 100644 --- a/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/wwwroot/openapi-original.json +++ b/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/wwwroot/openapi-original.json @@ -1052,14 +1052,24 @@ "allOf" : [ { "$ref" : "#/components/schemas/Animal" }, { - "$ref" : "#/components/schemas/Dog_allOf" + "properties" : { + "breed" : { + "type" : "string" + } + }, + "type" : "object" } ] }, "Cat" : { "allOf" : [ { "$ref" : "#/components/schemas/Animal" }, { - "$ref" : "#/components/schemas/Cat_allOf" + "properties" : { + "declawed" : { + "type" : "boolean" + } + }, + "type" : "object" } ] }, "Animal" : { @@ -1108,24 +1118,6 @@ } }, "type" : "object" - }, - "Dog_allOf" : { - "properties" : { - "breed" : { - "type" : "string" - } - }, - "type" : "object", - "example" : null - }, - "Cat_allOf" : { - "properties" : { - "declawed" : { - "type" : "boolean" - } - }, - "type" : "object", - "example" : null } }, "securitySchemes" : { diff --git a/samples/server/petstore/aspnetcore-3.1/.openapi-generator/FILES b/samples/server/petstore/aspnetcore-3.1/.openapi-generator/FILES index f36d2528d09..8a81b301272 100644 --- a/samples/server/petstore/aspnetcore-3.1/.openapi-generator/FILES +++ b/samples/server/petstore/aspnetcore-3.1/.openapi-generator/FILES @@ -17,10 +17,8 @@ src/Org.OpenAPITools/Formatters/InputFormatterStream.cs src/Org.OpenAPITools/Models/Animal.cs src/Org.OpenAPITools/Models/ApiResponse.cs src/Org.OpenAPITools/Models/Cat.cs -src/Org.OpenAPITools/Models/CatAllOf.cs src/Org.OpenAPITools/Models/Category.cs src/Org.OpenAPITools/Models/Dog.cs -src/Org.OpenAPITools/Models/DogAllOf.cs src/Org.OpenAPITools/Models/Order.cs src/Org.OpenAPITools/Models/Pet.cs src/Org.OpenAPITools/Models/Tag.cs diff --git a/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/wwwroot/openapi-original.json b/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/wwwroot/openapi-original.json index 53d1a8e9b10..75adab0d8b4 100644 --- a/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/wwwroot/openapi-original.json +++ b/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/wwwroot/openapi-original.json @@ -1052,14 +1052,24 @@ "allOf" : [ { "$ref" : "#/components/schemas/Animal" }, { - "$ref" : "#/components/schemas/Dog_allOf" + "properties" : { + "breed" : { + "type" : "string" + } + }, + "type" : "object" } ] }, "Cat" : { "allOf" : [ { "$ref" : "#/components/schemas/Animal" }, { - "$ref" : "#/components/schemas/Cat_allOf" + "properties" : { + "declawed" : { + "type" : "boolean" + } + }, + "type" : "object" } ] }, "Animal" : { @@ -1108,24 +1118,6 @@ } }, "type" : "object" - }, - "Dog_allOf" : { - "properties" : { - "breed" : { - "type" : "string" - } - }, - "type" : "object", - "example" : null - }, - "Cat_allOf" : { - "properties" : { - "declawed" : { - "type" : "boolean" - } - }, - "type" : "object", - "example" : null } }, "securitySchemes" : { diff --git a/samples/server/petstore/aspnetcore-5.0/.openapi-generator/FILES b/samples/server/petstore/aspnetcore-5.0/.openapi-generator/FILES index f36d2528d09..8a81b301272 100644 --- a/samples/server/petstore/aspnetcore-5.0/.openapi-generator/FILES +++ b/samples/server/petstore/aspnetcore-5.0/.openapi-generator/FILES @@ -17,10 +17,8 @@ src/Org.OpenAPITools/Formatters/InputFormatterStream.cs src/Org.OpenAPITools/Models/Animal.cs src/Org.OpenAPITools/Models/ApiResponse.cs src/Org.OpenAPITools/Models/Cat.cs -src/Org.OpenAPITools/Models/CatAllOf.cs src/Org.OpenAPITools/Models/Category.cs src/Org.OpenAPITools/Models/Dog.cs -src/Org.OpenAPITools/Models/DogAllOf.cs src/Org.OpenAPITools/Models/Order.cs src/Org.OpenAPITools/Models/Pet.cs src/Org.OpenAPITools/Models/Tag.cs diff --git a/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/wwwroot/openapi-original.json b/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/wwwroot/openapi-original.json index 53d1a8e9b10..75adab0d8b4 100644 --- a/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/wwwroot/openapi-original.json +++ b/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/wwwroot/openapi-original.json @@ -1052,14 +1052,24 @@ "allOf" : [ { "$ref" : "#/components/schemas/Animal" }, { - "$ref" : "#/components/schemas/Dog_allOf" + "properties" : { + "breed" : { + "type" : "string" + } + }, + "type" : "object" } ] }, "Cat" : { "allOf" : [ { "$ref" : "#/components/schemas/Animal" }, { - "$ref" : "#/components/schemas/Cat_allOf" + "properties" : { + "declawed" : { + "type" : "boolean" + } + }, + "type" : "object" } ] }, "Animal" : { @@ -1108,24 +1118,6 @@ } }, "type" : "object" - }, - "Dog_allOf" : { - "properties" : { - "breed" : { - "type" : "string" - } - }, - "type" : "object", - "example" : null - }, - "Cat_allOf" : { - "properties" : { - "declawed" : { - "type" : "boolean" - } - }, - "type" : "object", - "example" : null } }, "securitySchemes" : { diff --git a/samples/server/petstore/aspnetcore-6.0-NewtonsoftFalse/.openapi-generator/FILES b/samples/server/petstore/aspnetcore-6.0-NewtonsoftFalse/.openapi-generator/FILES index 2d78823754e..0cae9f829ca 100644 --- a/samples/server/petstore/aspnetcore-6.0-NewtonsoftFalse/.openapi-generator/FILES +++ b/samples/server/petstore/aspnetcore-6.0-NewtonsoftFalse/.openapi-generator/FILES @@ -17,10 +17,8 @@ src/Org.OpenAPITools/Formatters/InputFormatterStream.cs src/Org.OpenAPITools/Models/Animal.cs src/Org.OpenAPITools/Models/ApiResponse.cs src/Org.OpenAPITools/Models/Cat.cs -src/Org.OpenAPITools/Models/CatAllOf.cs src/Org.OpenAPITools/Models/Category.cs src/Org.OpenAPITools/Models/Dog.cs -src/Org.OpenAPITools/Models/DogAllOf.cs src/Org.OpenAPITools/Models/Order.cs src/Org.OpenAPITools/Models/Pet.cs src/Org.OpenAPITools/Models/Tag.cs diff --git a/samples/server/petstore/aspnetcore-6.0-NewtonsoftFalse/src/Org.OpenAPITools/wwwroot/openapi-original.json b/samples/server/petstore/aspnetcore-6.0-NewtonsoftFalse/src/Org.OpenAPITools/wwwroot/openapi-original.json index 53d1a8e9b10..75adab0d8b4 100644 --- a/samples/server/petstore/aspnetcore-6.0-NewtonsoftFalse/src/Org.OpenAPITools/wwwroot/openapi-original.json +++ b/samples/server/petstore/aspnetcore-6.0-NewtonsoftFalse/src/Org.OpenAPITools/wwwroot/openapi-original.json @@ -1052,14 +1052,24 @@ "allOf" : [ { "$ref" : "#/components/schemas/Animal" }, { - "$ref" : "#/components/schemas/Dog_allOf" + "properties" : { + "breed" : { + "type" : "string" + } + }, + "type" : "object" } ] }, "Cat" : { "allOf" : [ { "$ref" : "#/components/schemas/Animal" }, { - "$ref" : "#/components/schemas/Cat_allOf" + "properties" : { + "declawed" : { + "type" : "boolean" + } + }, + "type" : "object" } ] }, "Animal" : { @@ -1108,24 +1118,6 @@ } }, "type" : "object" - }, - "Dog_allOf" : { - "properties" : { - "breed" : { - "type" : "string" - } - }, - "type" : "object", - "example" : null - }, - "Cat_allOf" : { - "properties" : { - "declawed" : { - "type" : "boolean" - } - }, - "type" : "object", - "example" : null } }, "securitySchemes" : { diff --git a/samples/server/petstore/aspnetcore-6.0-nullableReferenceTypes/.openapi-generator/FILES b/samples/server/petstore/aspnetcore-6.0-nullableReferenceTypes/.openapi-generator/FILES index 2d78823754e..0cae9f829ca 100644 --- a/samples/server/petstore/aspnetcore-6.0-nullableReferenceTypes/.openapi-generator/FILES +++ b/samples/server/petstore/aspnetcore-6.0-nullableReferenceTypes/.openapi-generator/FILES @@ -17,10 +17,8 @@ src/Org.OpenAPITools/Formatters/InputFormatterStream.cs src/Org.OpenAPITools/Models/Animal.cs src/Org.OpenAPITools/Models/ApiResponse.cs src/Org.OpenAPITools/Models/Cat.cs -src/Org.OpenAPITools/Models/CatAllOf.cs src/Org.OpenAPITools/Models/Category.cs src/Org.OpenAPITools/Models/Dog.cs -src/Org.OpenAPITools/Models/DogAllOf.cs src/Org.OpenAPITools/Models/Order.cs src/Org.OpenAPITools/Models/Pet.cs src/Org.OpenAPITools/Models/Tag.cs diff --git a/samples/server/petstore/aspnetcore-6.0-nullableReferenceTypes/src/Org.OpenAPITools/wwwroot/openapi-original.json b/samples/server/petstore/aspnetcore-6.0-nullableReferenceTypes/src/Org.OpenAPITools/wwwroot/openapi-original.json index 53d1a8e9b10..75adab0d8b4 100644 --- a/samples/server/petstore/aspnetcore-6.0-nullableReferenceTypes/src/Org.OpenAPITools/wwwroot/openapi-original.json +++ b/samples/server/petstore/aspnetcore-6.0-nullableReferenceTypes/src/Org.OpenAPITools/wwwroot/openapi-original.json @@ -1052,14 +1052,24 @@ "allOf" : [ { "$ref" : "#/components/schemas/Animal" }, { - "$ref" : "#/components/schemas/Dog_allOf" + "properties" : { + "breed" : { + "type" : "string" + } + }, + "type" : "object" } ] }, "Cat" : { "allOf" : [ { "$ref" : "#/components/schemas/Animal" }, { - "$ref" : "#/components/schemas/Cat_allOf" + "properties" : { + "declawed" : { + "type" : "boolean" + } + }, + "type" : "object" } ] }, "Animal" : { @@ -1108,24 +1118,6 @@ } }, "type" : "object" - }, - "Dog_allOf" : { - "properties" : { - "breed" : { - "type" : "string" - } - }, - "type" : "object", - "example" : null - }, - "Cat_allOf" : { - "properties" : { - "declawed" : { - "type" : "boolean" - } - }, - "type" : "object", - "example" : null } }, "securitySchemes" : { diff --git a/samples/server/petstore/aspnetcore-6.0-pocoModels/.openapi-generator/FILES b/samples/server/petstore/aspnetcore-6.0-pocoModels/.openapi-generator/FILES index 2d78823754e..0cae9f829ca 100644 --- a/samples/server/petstore/aspnetcore-6.0-pocoModels/.openapi-generator/FILES +++ b/samples/server/petstore/aspnetcore-6.0-pocoModels/.openapi-generator/FILES @@ -17,10 +17,8 @@ src/Org.OpenAPITools/Formatters/InputFormatterStream.cs src/Org.OpenAPITools/Models/Animal.cs src/Org.OpenAPITools/Models/ApiResponse.cs src/Org.OpenAPITools/Models/Cat.cs -src/Org.OpenAPITools/Models/CatAllOf.cs src/Org.OpenAPITools/Models/Category.cs src/Org.OpenAPITools/Models/Dog.cs -src/Org.OpenAPITools/Models/DogAllOf.cs src/Org.OpenAPITools/Models/Order.cs src/Org.OpenAPITools/Models/Pet.cs src/Org.OpenAPITools/Models/Tag.cs diff --git a/samples/server/petstore/aspnetcore-6.0-pocoModels/src/Org.OpenAPITools/wwwroot/openapi-original.json b/samples/server/petstore/aspnetcore-6.0-pocoModels/src/Org.OpenAPITools/wwwroot/openapi-original.json index 53d1a8e9b10..75adab0d8b4 100644 --- a/samples/server/petstore/aspnetcore-6.0-pocoModels/src/Org.OpenAPITools/wwwroot/openapi-original.json +++ b/samples/server/petstore/aspnetcore-6.0-pocoModels/src/Org.OpenAPITools/wwwroot/openapi-original.json @@ -1052,14 +1052,24 @@ "allOf" : [ { "$ref" : "#/components/schemas/Animal" }, { - "$ref" : "#/components/schemas/Dog_allOf" + "properties" : { + "breed" : { + "type" : "string" + } + }, + "type" : "object" } ] }, "Cat" : { "allOf" : [ { "$ref" : "#/components/schemas/Animal" }, { - "$ref" : "#/components/schemas/Cat_allOf" + "properties" : { + "declawed" : { + "type" : "boolean" + } + }, + "type" : "object" } ] }, "Animal" : { @@ -1108,24 +1118,6 @@ } }, "type" : "object" - }, - "Dog_allOf" : { - "properties" : { - "breed" : { - "type" : "string" - } - }, - "type" : "object", - "example" : null - }, - "Cat_allOf" : { - "properties" : { - "declawed" : { - "type" : "boolean" - } - }, - "type" : "object", - "example" : null } }, "securitySchemes" : { diff --git a/samples/server/petstore/aspnetcore-6.0-project4Models/.openapi-generator/FILES b/samples/server/petstore/aspnetcore-6.0-project4Models/.openapi-generator/FILES index cc2706c4be0..2fa34238cdf 100644 --- a/samples/server/petstore/aspnetcore-6.0-project4Models/.openapi-generator/FILES +++ b/samples/server/petstore/aspnetcore-6.0-project4Models/.openapi-generator/FILES @@ -6,11 +6,9 @@ src/Org.OpenAPITools.Models/.gitignore src/Org.OpenAPITools.Models/Animal.cs src/Org.OpenAPITools.Models/ApiResponse.cs src/Org.OpenAPITools.Models/Cat.cs -src/Org.OpenAPITools.Models/CatAllOf.cs src/Org.OpenAPITools.Models/Category.cs src/Org.OpenAPITools.Models/Converters/CustomEnumConverter.cs src/Org.OpenAPITools.Models/Dog.cs -src/Org.OpenAPITools.Models/DogAllOf.cs src/Org.OpenAPITools.Models/Order.cs src/Org.OpenAPITools.Models/Org.OpenAPITools.Models.csproj src/Org.OpenAPITools.Models/Pet.cs diff --git a/samples/server/petstore/aspnetcore-6.0-project4Models/src/Org.OpenAPITools/wwwroot/openapi-original.json b/samples/server/petstore/aspnetcore-6.0-project4Models/src/Org.OpenAPITools/wwwroot/openapi-original.json index 53d1a8e9b10..75adab0d8b4 100644 --- a/samples/server/petstore/aspnetcore-6.0-project4Models/src/Org.OpenAPITools/wwwroot/openapi-original.json +++ b/samples/server/petstore/aspnetcore-6.0-project4Models/src/Org.OpenAPITools/wwwroot/openapi-original.json @@ -1052,14 +1052,24 @@ "allOf" : [ { "$ref" : "#/components/schemas/Animal" }, { - "$ref" : "#/components/schemas/Dog_allOf" + "properties" : { + "breed" : { + "type" : "string" + } + }, + "type" : "object" } ] }, "Cat" : { "allOf" : [ { "$ref" : "#/components/schemas/Animal" }, { - "$ref" : "#/components/schemas/Cat_allOf" + "properties" : { + "declawed" : { + "type" : "boolean" + } + }, + "type" : "object" } ] }, "Animal" : { @@ -1108,24 +1118,6 @@ } }, "type" : "object" - }, - "Dog_allOf" : { - "properties" : { - "breed" : { - "type" : "string" - } - }, - "type" : "object", - "example" : null - }, - "Cat_allOf" : { - "properties" : { - "declawed" : { - "type" : "boolean" - } - }, - "type" : "object", - "example" : null } }, "securitySchemes" : { diff --git a/samples/server/petstore/aspnetcore-6.0-useSwashBuckle/.openapi-generator/FILES b/samples/server/petstore/aspnetcore-6.0-useSwashBuckle/.openapi-generator/FILES index 94dce5508ef..e63833fe8ef 100644 --- a/samples/server/petstore/aspnetcore-6.0-useSwashBuckle/.openapi-generator/FILES +++ b/samples/server/petstore/aspnetcore-6.0-useSwashBuckle/.openapi-generator/FILES @@ -14,10 +14,8 @@ src/Org.OpenAPITools/Formatters/InputFormatterStream.cs src/Org.OpenAPITools/Models/Animal.cs src/Org.OpenAPITools/Models/ApiResponse.cs src/Org.OpenAPITools/Models/Cat.cs -src/Org.OpenAPITools/Models/CatAllOf.cs src/Org.OpenAPITools/Models/Category.cs src/Org.OpenAPITools/Models/Dog.cs -src/Org.OpenAPITools/Models/DogAllOf.cs src/Org.OpenAPITools/Models/Order.cs src/Org.OpenAPITools/Models/Pet.cs src/Org.OpenAPITools/Models/Tag.cs diff --git a/samples/server/petstore/aspnetcore-6.0/.openapi-generator/FILES b/samples/server/petstore/aspnetcore-6.0/.openapi-generator/FILES index 2d78823754e..0cae9f829ca 100644 --- a/samples/server/petstore/aspnetcore-6.0/.openapi-generator/FILES +++ b/samples/server/petstore/aspnetcore-6.0/.openapi-generator/FILES @@ -17,10 +17,8 @@ src/Org.OpenAPITools/Formatters/InputFormatterStream.cs src/Org.OpenAPITools/Models/Animal.cs src/Org.OpenAPITools/Models/ApiResponse.cs src/Org.OpenAPITools/Models/Cat.cs -src/Org.OpenAPITools/Models/CatAllOf.cs src/Org.OpenAPITools/Models/Category.cs src/Org.OpenAPITools/Models/Dog.cs -src/Org.OpenAPITools/Models/DogAllOf.cs src/Org.OpenAPITools/Models/Order.cs src/Org.OpenAPITools/Models/Pet.cs src/Org.OpenAPITools/Models/Tag.cs diff --git a/samples/server/petstore/aspnetcore-6.0/src/Org.OpenAPITools/wwwroot/openapi-original.json b/samples/server/petstore/aspnetcore-6.0/src/Org.OpenAPITools/wwwroot/openapi-original.json index 53d1a8e9b10..75adab0d8b4 100644 --- a/samples/server/petstore/aspnetcore-6.0/src/Org.OpenAPITools/wwwroot/openapi-original.json +++ b/samples/server/petstore/aspnetcore-6.0/src/Org.OpenAPITools/wwwroot/openapi-original.json @@ -1052,14 +1052,24 @@ "allOf" : [ { "$ref" : "#/components/schemas/Animal" }, { - "$ref" : "#/components/schemas/Dog_allOf" + "properties" : { + "breed" : { + "type" : "string" + } + }, + "type" : "object" } ] }, "Cat" : { "allOf" : [ { "$ref" : "#/components/schemas/Animal" }, { - "$ref" : "#/components/schemas/Cat_allOf" + "properties" : { + "declawed" : { + "type" : "boolean" + } + }, + "type" : "object" } ] }, "Animal" : { @@ -1108,24 +1118,6 @@ } }, "type" : "object" - }, - "Dog_allOf" : { - "properties" : { - "breed" : { - "type" : "string" - } - }, - "type" : "object", - "example" : null - }, - "Cat_allOf" : { - "properties" : { - "declawed" : { - "type" : "boolean" - } - }, - "type" : "object", - "example" : null } }, "securitySchemes" : { diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/.openapi-generator/FILES b/samples/server/petstore/cpp-restbed/generated/3_0/.openapi-generator/FILES index c35019313a8..538c54f0c20 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/.openapi-generator/FILES +++ b/samples/server/petstore/cpp-restbed/generated/3_0/.openapi-generator/FILES @@ -35,8 +35,6 @@ model/Capitalization.cpp model/Capitalization.h model/Cat.cpp model/Cat.h -model/Cat_allOf.cpp -model/Cat_allOf.h model/Category.cpp model/Category.h model/ClassModel.cpp @@ -47,8 +45,6 @@ model/DeprecatedObject.cpp model/DeprecatedObject.h model/Dog.cpp model/Dog.h -model/Dog_allOf.cpp -model/Dog_allOf.h model/EnumArrays.cpp model/EnumArrays.h model/EnumClass.cpp diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/Cat.h b/samples/server/petstore/cpp-restbed/generated/3_0/model/Cat.h index a71d02e05cd..fceb492f3ab 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/Cat.h +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/Cat.h @@ -27,7 +27,6 @@ #include #include #include "Animal.h" -#include "Cat_allOf.h" #include "helpers.h" namespace org { @@ -38,7 +37,7 @@ namespace model { ///

/// /// -class Cat : public Animal, public Cat_allOf +class Cat : public Animal { public: Cat() = default; diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/Dog.h b/samples/server/petstore/cpp-restbed/generated/3_0/model/Dog.h index 02519fa1f37..036f607db1a 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/Dog.h +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/Dog.h @@ -27,7 +27,6 @@ #include #include #include "Animal.h" -#include "Dog_allOf.h" #include "helpers.h" namespace org { @@ -38,7 +37,7 @@ namespace model { /// /// /// -class Dog : public Animal, public Dog_allOf +class Dog : public Animal { public: Dog() = default; diff --git a/samples/server/petstore/helidon/se-default/src/main/java/org/openapitools/server/model/CatAllOf.java b/samples/server/petstore/helidon/se-default/src/main/java/org/openapitools/server/model/CatAllOf.java deleted file mode 100644 index 8d2e8a501d6..00000000000 --- a/samples/server/petstore/helidon/se-default/src/main/java/org/openapitools/server/model/CatAllOf.java +++ /dev/null @@ -1,67 +0,0 @@ -package org.openapitools.server.model; - -import com.fasterxml.jackson.annotation.JsonTypeName; - - - -public class CatAllOf { - - private Boolean declawed; - - /** - * Default constructor. - */ - public CatAllOf() { - // JSON-B / Jackson - } - - /** - * Create CatAllOf. - * - * @param declawed declawed - */ - public CatAllOf( - Boolean declawed - ) { - this.declawed = declawed; - } - - - - /** - * Get declawed - * @return declawed - */ - public Boolean getDeclawed() { - return declawed; - } - - public void setDeclawed(Boolean declawed) { - this.declawed = declawed; - } - - /** - * Create a string representation of this pojo. - **/ - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CatAllOf {\n"); - - sb.append(" declawed: ").append(toIndentedString(declawed)).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 static String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/helidon/se-default/src/main/java/org/openapitools/server/model/DogAllOf.java b/samples/server/petstore/helidon/se-default/src/main/java/org/openapitools/server/model/DogAllOf.java deleted file mode 100644 index f4f1dd5724e..00000000000 --- a/samples/server/petstore/helidon/se-default/src/main/java/org/openapitools/server/model/DogAllOf.java +++ /dev/null @@ -1,67 +0,0 @@ -package org.openapitools.server.model; - -import com.fasterxml.jackson.annotation.JsonTypeName; - - - -public class DogAllOf { - - private String breed; - - /** - * Default constructor. - */ - public DogAllOf() { - // JSON-B / Jackson - } - - /** - * Create DogAllOf. - * - * @param breed breed - */ - public DogAllOf( - String breed - ) { - this.breed = breed; - } - - - - /** - * Get breed - * @return breed - */ - public String getBreed() { - return breed; - } - - public void setBreed(String breed) { - this.breed = breed; - } - - /** - * Create a string representation of this pojo. - **/ - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DogAllOf {\n"); - - sb.append(" breed: ").append(toIndentedString(breed)).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 static String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/helidon/se-default/src/test/java/org/openapitools/server/model/CatAllOfTest.java b/samples/server/petstore/helidon/se-default/src/test/java/org/openapitools/server/model/CatAllOfTest.java deleted file mode 100644 index ab121c24d90..00000000000 --- a/samples/server/petstore/helidon/se-default/src/test/java/org/openapitools/server/model/CatAllOfTest.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.server.model; - -import com.fasterxml.jackson.annotation.JsonTypeName; -import org.junit.jupiter.api.Test; - - -/** - * Model tests for CatAllOf - */ -public class CatAllOfTest { - private final CatAllOf model = new CatAllOf(); - - /** - * Model tests for CatAllOf - */ - @Test - public void testCatAllOf() { - // TODO: test CatAllOf - } - - /** - * Test the property 'declawed' - */ - @Test - public void declawedTest() { - // TODO: test declawed - } - -} diff --git a/samples/server/petstore/helidon/se-default/src/test/java/org/openapitools/server/model/DogAllOfTest.java b/samples/server/petstore/helidon/se-default/src/test/java/org/openapitools/server/model/DogAllOfTest.java deleted file mode 100644 index 2759c9a2eb9..00000000000 --- a/samples/server/petstore/helidon/se-default/src/test/java/org/openapitools/server/model/DogAllOfTest.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.server.model; - -import com.fasterxml.jackson.annotation.JsonTypeName; -import org.junit.jupiter.api.Test; - - -/** - * Model tests for DogAllOf - */ -public class DogAllOfTest { - private final DogAllOf model = new DogAllOf(); - - /** - * Model tests for DogAllOf - */ - @Test - public void testDogAllOf() { - // TODO: test DogAllOf - } - - /** - * Test the property 'breed' - */ - @Test - public void breedTest() { - // TODO: test breed - } - -} diff --git a/samples/server/petstore/java-helidon-server/mp/.openapi-generator/FILES b/samples/server/petstore/java-helidon-server/mp/.openapi-generator/FILES index ea437760132..5aaf8ee8e3a 100644 --- a/samples/server/petstore/java-helidon-server/mp/.openapi-generator/FILES +++ b/samples/server/petstore/java-helidon-server/mp/.openapi-generator/FILES @@ -25,13 +25,11 @@ src/main/java/org/openapitools/server/model/ArrayOfNumberOnly.java src/main/java/org/openapitools/server/model/ArrayTest.java src/main/java/org/openapitools/server/model/Capitalization.java src/main/java/org/openapitools/server/model/Cat.java -src/main/java/org/openapitools/server/model/CatAllOf.java src/main/java/org/openapitools/server/model/Category.java src/main/java/org/openapitools/server/model/ClassModel.java src/main/java/org/openapitools/server/model/Client.java src/main/java/org/openapitools/server/model/DeprecatedObject.java src/main/java/org/openapitools/server/model/Dog.java -src/main/java/org/openapitools/server/model/DogAllOf.java src/main/java/org/openapitools/server/model/EnumArrays.java src/main/java/org/openapitools/server/model/EnumClass.java src/main/java/org/openapitools/server/model/EnumTest.java diff --git a/samples/server/petstore/java-helidon-server/mp/src/main/java/org/openapitools/server/model/CatAllOf.java b/samples/server/petstore/java-helidon-server/mp/src/main/java/org/openapitools/server/model/CatAllOf.java deleted file mode 100644 index e04130db72b..00000000000 --- a/samples/server/petstore/java-helidon-server/mp/src/main/java/org/openapitools/server/model/CatAllOf.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.server.model; - -import com.fasterxml.jackson.annotation.JsonTypeName; -import jakarta.validation.constraints.*; -import jakarta.validation.Valid; - - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonValue; - - -public class CatAllOf { - - private Boolean declawed; - - /** - * Get declawed - * @return declawed - **/ - public Boolean getDeclawed() { - return declawed; - } - - /** - * Set declawed - **/ - public void setDeclawed(Boolean declawed) { - this.declawed = declawed; - } - - public CatAllOf declawed(Boolean declawed) { - this.declawed = declawed; - return this; - } - - - /** - * Create a string representation of this pojo. - **/ - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CatAllOf {\n"); - - sb.append(" declawed: ").append(toIndentedString(declawed)).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 static String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/java-helidon-server/mp/src/main/java/org/openapitools/server/model/DogAllOf.java b/samples/server/petstore/java-helidon-server/mp/src/main/java/org/openapitools/server/model/DogAllOf.java deleted file mode 100644 index 6055672091e..00000000000 --- a/samples/server/petstore/java-helidon-server/mp/src/main/java/org/openapitools/server/model/DogAllOf.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.server.model; - -import com.fasterxml.jackson.annotation.JsonTypeName; -import jakarta.validation.constraints.*; -import jakarta.validation.Valid; - - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonValue; - - -public class DogAllOf { - - private String breed; - - /** - * Get breed - * @return breed - **/ - public String getBreed() { - return breed; - } - - /** - * Set breed - **/ - public void setBreed(String breed) { - this.breed = breed; - } - - public DogAllOf breed(String breed) { - this.breed = breed; - return this; - } - - - /** - * Create a string representation of this pojo. - **/ - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DogAllOf {\n"); - - sb.append(" breed: ").append(toIndentedString(breed)).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 static String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/java-helidon-server/mp/src/main/resources/META-INF/openapi.yml b/samples/server/petstore/java-helidon-server/mp/src/main/resources/META-INF/openapi.yml index d69d4ab7749..66bea57fa64 100644 --- a/samples/server/petstore/java-helidon-server/mp/src/main/resources/META-INF/openapi.yml +++ b/samples/server/petstore/java-helidon-server/mp/src/main/resources/META-INF/openapi.yml @@ -1515,11 +1515,17 @@ components: Dog: allOf: - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Dog_allOf' + - properties: + breed: + type: string + type: object Cat: allOf: - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Cat_allOf' + - properties: + declawed: + type: boolean + type: object Animal: discriminator: mapping: @@ -2159,18 +2165,6 @@ components: required: - requiredFile type: object - Dog_allOf: - properties: - breed: - type: string - type: object - example: null - Cat_allOf: - properties: - declawed: - type: boolean - type: object - example: null securitySchemes: petstore_auth: flows: diff --git a/samples/server/petstore/java-helidon-server/mp/src/test/java/org/openapitools/server/model/CatAllOfTest.java b/samples/server/petstore/java-helidon-server/mp/src/test/java/org/openapitools/server/model/CatAllOfTest.java deleted file mode 100644 index ab121c24d90..00000000000 --- a/samples/server/petstore/java-helidon-server/mp/src/test/java/org/openapitools/server/model/CatAllOfTest.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.server.model; - -import com.fasterxml.jackson.annotation.JsonTypeName; -import org.junit.jupiter.api.Test; - - -/** - * Model tests for CatAllOf - */ -public class CatAllOfTest { - private final CatAllOf model = new CatAllOf(); - - /** - * Model tests for CatAllOf - */ - @Test - public void testCatAllOf() { - // TODO: test CatAllOf - } - - /** - * Test the property 'declawed' - */ - @Test - public void declawedTest() { - // TODO: test declawed - } - -} diff --git a/samples/server/petstore/java-helidon-server/mp/src/test/java/org/openapitools/server/model/DogAllOfTest.java b/samples/server/petstore/java-helidon-server/mp/src/test/java/org/openapitools/server/model/DogAllOfTest.java deleted file mode 100644 index 2759c9a2eb9..00000000000 --- a/samples/server/petstore/java-helidon-server/mp/src/test/java/org/openapitools/server/model/DogAllOfTest.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.server.model; - -import com.fasterxml.jackson.annotation.JsonTypeName; -import org.junit.jupiter.api.Test; - - -/** - * Model tests for DogAllOf - */ -public class DogAllOfTest { - private final DogAllOf model = new DogAllOf(); - - /** - * Model tests for DogAllOf - */ - @Test - public void testDogAllOf() { - // TODO: test DogAllOf - } - - /** - * Test the property 'breed' - */ - @Test - public void breedTest() { - // TODO: test breed - } - -} diff --git a/samples/server/petstore/java-helidon-server/se/.openapi-generator/FILES b/samples/server/petstore/java-helidon-server/se/.openapi-generator/FILES index f8d0d60daa4..c3c751515ab 100644 --- a/samples/server/petstore/java-helidon-server/se/.openapi-generator/FILES +++ b/samples/server/petstore/java-helidon-server/se/.openapi-generator/FILES @@ -26,13 +26,11 @@ src/main/java/org/openapitools/server/model/ArrayOfNumberOnly.java src/main/java/org/openapitools/server/model/ArrayTest.java src/main/java/org/openapitools/server/model/Capitalization.java src/main/java/org/openapitools/server/model/Cat.java -src/main/java/org/openapitools/server/model/CatAllOf.java src/main/java/org/openapitools/server/model/Category.java src/main/java/org/openapitools/server/model/ClassModel.java src/main/java/org/openapitools/server/model/Client.java src/main/java/org/openapitools/server/model/DeprecatedObject.java src/main/java/org/openapitools/server/model/Dog.java -src/main/java/org/openapitools/server/model/DogAllOf.java src/main/java/org/openapitools/server/model/EnumArrays.java src/main/java/org/openapitools/server/model/EnumClass.java src/main/java/org/openapitools/server/model/EnumTest.java diff --git a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/CatAllOf.java b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/CatAllOf.java deleted file mode 100644 index 8d2e8a501d6..00000000000 --- a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/CatAllOf.java +++ /dev/null @@ -1,67 +0,0 @@ -package org.openapitools.server.model; - -import com.fasterxml.jackson.annotation.JsonTypeName; - - - -public class CatAllOf { - - private Boolean declawed; - - /** - * Default constructor. - */ - public CatAllOf() { - // JSON-B / Jackson - } - - /** - * Create CatAllOf. - * - * @param declawed declawed - */ - public CatAllOf( - Boolean declawed - ) { - this.declawed = declawed; - } - - - - /** - * Get declawed - * @return declawed - */ - public Boolean getDeclawed() { - return declawed; - } - - public void setDeclawed(Boolean declawed) { - this.declawed = declawed; - } - - /** - * Create a string representation of this pojo. - **/ - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CatAllOf {\n"); - - sb.append(" declawed: ").append(toIndentedString(declawed)).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 static String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/DogAllOf.java b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/DogAllOf.java deleted file mode 100644 index f4f1dd5724e..00000000000 --- a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/DogAllOf.java +++ /dev/null @@ -1,67 +0,0 @@ -package org.openapitools.server.model; - -import com.fasterxml.jackson.annotation.JsonTypeName; - - - -public class DogAllOf { - - private String breed; - - /** - * Default constructor. - */ - public DogAllOf() { - // JSON-B / Jackson - } - - /** - * Create DogAllOf. - * - * @param breed breed - */ - public DogAllOf( - String breed - ) { - this.breed = breed; - } - - - - /** - * Get breed - * @return breed - */ - public String getBreed() { - return breed; - } - - public void setBreed(String breed) { - this.breed = breed; - } - - /** - * Create a string representation of this pojo. - **/ - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DogAllOf {\n"); - - sb.append(" breed: ").append(toIndentedString(breed)).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 static String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/java-helidon-server/se/src/main/resources/META-INF/openapi.yml b/samples/server/petstore/java-helidon-server/se/src/main/resources/META-INF/openapi.yml index d69d4ab7749..66bea57fa64 100644 --- a/samples/server/petstore/java-helidon-server/se/src/main/resources/META-INF/openapi.yml +++ b/samples/server/petstore/java-helidon-server/se/src/main/resources/META-INF/openapi.yml @@ -1515,11 +1515,17 @@ components: Dog: allOf: - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Dog_allOf' + - properties: + breed: + type: string + type: object Cat: allOf: - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Cat_allOf' + - properties: + declawed: + type: boolean + type: object Animal: discriminator: mapping: @@ -2159,18 +2165,6 @@ components: required: - requiredFile type: object - Dog_allOf: - properties: - breed: - type: string - type: object - example: null - Cat_allOf: - properties: - declawed: - type: boolean - type: object - example: null securitySchemes: petstore_auth: flows: diff --git a/samples/server/petstore/java-helidon-server/se/src/test/java/org/openapitools/server/model/CatAllOfTest.java b/samples/server/petstore/java-helidon-server/se/src/test/java/org/openapitools/server/model/CatAllOfTest.java deleted file mode 100644 index ab121c24d90..00000000000 --- a/samples/server/petstore/java-helidon-server/se/src/test/java/org/openapitools/server/model/CatAllOfTest.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.server.model; - -import com.fasterxml.jackson.annotation.JsonTypeName; -import org.junit.jupiter.api.Test; - - -/** - * Model tests for CatAllOf - */ -public class CatAllOfTest { - private final CatAllOf model = new CatAllOf(); - - /** - * Model tests for CatAllOf - */ - @Test - public void testCatAllOf() { - // TODO: test CatAllOf - } - - /** - * Test the property 'declawed' - */ - @Test - public void declawedTest() { - // TODO: test declawed - } - -} diff --git a/samples/server/petstore/java-helidon-server/se/src/test/java/org/openapitools/server/model/DogAllOfTest.java b/samples/server/petstore/java-helidon-server/se/src/test/java/org/openapitools/server/model/DogAllOfTest.java deleted file mode 100644 index 2759c9a2eb9..00000000000 --- a/samples/server/petstore/java-helidon-server/se/src/test/java/org/openapitools/server/model/DogAllOfTest.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.server.model; - -import com.fasterxml.jackson.annotation.JsonTypeName; -import org.junit.jupiter.api.Test; - - -/** - * Model tests for DogAllOf - */ -public class DogAllOfTest { - private final DogAllOf model = new DogAllOf(); - - /** - * Model tests for DogAllOf - */ - @Test - public void testDogAllOf() { - // TODO: test DogAllOf - } - - /** - * Test the property 'breed' - */ - @Test - public void breedTest() { - // TODO: test breed - } - -} diff --git a/samples/server/petstore/java-inflector/src/gen/java/org/openapitools/model/BigCatAllOf.java b/samples/server/petstore/java-inflector/src/gen/java/org/openapitools/model/BigCatAllOf.java deleted file mode 100644 index b66babcdc5e..00000000000 --- a/samples/server/petstore/java-inflector/src/gen/java/org/openapitools/model/BigCatAllOf.java +++ /dev/null @@ -1,111 +0,0 @@ -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.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; - - - - - -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaInflectorServerCodegen") -public class BigCatAllOf { - /** - * Gets or Sets kind - */ - public enum KindEnum { - LIONS("lions"), - - TIGERS("tigers"), - - LEOPARDS("leopards"), - - JAGUARS("jaguars"); - - private String value; - - KindEnum(String value) { - this.value = value; - } - - @Override - @JsonValue - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static KindEnum fromValue(String text) { - for (KindEnum b : KindEnum.values()) { - if (String.valueOf(b.value).equals(text)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + text + "'"); - } - } - - @JsonProperty("kind") - private KindEnum kind; - - /** - **/ - public BigCatAllOf kind(KindEnum kind) { - this.kind = kind; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("kind") - public KindEnum getKind() { - return kind; - } - public void setKind(KindEnum kind) { - this.kind = kind; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BigCatAllOf bigCatAllOf = (BigCatAllOf) o; - return Objects.equals(kind, bigCatAllOf.kind); - } - - @Override - public int hashCode() { - return Objects.hash(kind); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BigCatAllOf {\n"); - - sb.append(" kind: ").append(toIndentedString(kind)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/java-inflector/src/gen/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/java-inflector/src/gen/java/org/openapitools/model/CatAllOf.java deleted file mode 100644 index 2b7dfeb6e05..00000000000 --- a/samples/server/petstore/java-inflector/src/gen/java/org/openapitools/model/CatAllOf.java +++ /dev/null @@ -1,75 +0,0 @@ -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.JsonTypeName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; - - - - - -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaInflectorServerCodegen") -public class CatAllOf { - @JsonProperty("declawed") - private Boolean declawed; - - /** - **/ - public CatAllOf declawed(Boolean declawed) { - this.declawed = declawed; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("declawed") - public Boolean getDeclawed() { - return declawed; - } - public void setDeclawed(Boolean declawed) { - this.declawed = declawed; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CatAllOf catAllOf = (CatAllOf) o; - return Objects.equals(declawed, catAllOf.declawed); - } - - @Override - public int hashCode() { - return Objects.hash(declawed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CatAllOf {\n"); - - sb.append(" declawed: ").append(toIndentedString(declawed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/java-inflector/src/gen/java/org/openapitools/model/DogAllOf.java b/samples/server/petstore/java-inflector/src/gen/java/org/openapitools/model/DogAllOf.java deleted file mode 100644 index b654fcedebb..00000000000 --- a/samples/server/petstore/java-inflector/src/gen/java/org/openapitools/model/DogAllOf.java +++ /dev/null @@ -1,75 +0,0 @@ -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.JsonTypeName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; - - - - - -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaInflectorServerCodegen") -public class DogAllOf { - @JsonProperty("breed") - private String breed; - - /** - **/ - public DogAllOf breed(String breed) { - this.breed = breed; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("breed") - public String getBreed() { - return breed; - } - public void setBreed(String breed) { - this.breed = breed; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DogAllOf dogAllOf = (DogAllOf) o; - return Objects.equals(breed, dogAllOf.breed); - } - - @Override - public int hashCode() { - return Objects.hash(breed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DogAllOf {\n"); - - sb.append(" breed: ").append(toIndentedString(breed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/java-msf4j/.openapi-generator/FILES b/samples/server/petstore/java-msf4j/.openapi-generator/FILES index d2655934c4e..7817fdab15d 100644 --- a/samples/server/petstore/java-msf4j/.openapi-generator/FILES +++ b/samples/server/petstore/java-msf4j/.openapi-generator/FILES @@ -33,15 +33,12 @@ src/gen/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java src/gen/java/org/openapitools/model/ArrayOfNumberOnly.java src/gen/java/org/openapitools/model/ArrayTest.java src/gen/java/org/openapitools/model/BigCat.java -src/gen/java/org/openapitools/model/BigCatAllOf.java src/gen/java/org/openapitools/model/Capitalization.java src/gen/java/org/openapitools/model/Cat.java -src/gen/java/org/openapitools/model/CatAllOf.java src/gen/java/org/openapitools/model/Category.java src/gen/java/org/openapitools/model/ClassModel.java src/gen/java/org/openapitools/model/Client.java src/gen/java/org/openapitools/model/Dog.java -src/gen/java/org/openapitools/model/DogAllOf.java src/gen/java/org/openapitools/model/EnumArrays.java src/gen/java/org/openapitools/model/EnumClass.java src/gen/java/org/openapitools/model/EnumTest.java diff --git a/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/model/BigCatAllOf.java b/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/model/BigCatAllOf.java deleted file mode 100644 index 77bb91d3121..00000000000 --- a/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/model/BigCatAllOf.java +++ /dev/null @@ -1,111 +0,0 @@ -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.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; - -/** - * BigCatAllOf - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaMSF4JServerCodegen") -public class BigCatAllOf { - /** - * Gets or Sets kind - */ - public enum KindEnum { - LIONS("lions"), - - TIGERS("tigers"), - - LEOPARDS("leopards"), - - JAGUARS("jaguars"); - - private String value; - - KindEnum(String value) { - this.value = value; - } - - @Override - @JsonValue - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static KindEnum fromValue(String text) { - for (KindEnum b : KindEnum.values()) { - if (String.valueOf(b.value).equals(text)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + text + "'"); - } - } - - @JsonProperty("kind") - private KindEnum kind; - - public BigCatAllOf kind(KindEnum kind) { - this.kind = kind; - return this; - } - - /** - * Get kind - * @return kind - **/ - @ApiModelProperty(value = "") - public KindEnum getKind() { - return kind; - } - - public void setKind(KindEnum kind) { - this.kind = kind; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BigCatAllOf bigCatAllOf = (BigCatAllOf) o; - return Objects.equals(this.kind, bigCatAllOf.kind); - } - - @Override - public int hashCode() { - return Objects.hash(kind); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BigCatAllOf {\n"); - - sb.append(" kind: ").append(toIndentedString(kind)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/model/CatAllOf.java deleted file mode 100644 index 79bab35f1d7..00000000000 --- a/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/model/CatAllOf.java +++ /dev/null @@ -1,75 +0,0 @@ -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.JsonTypeName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; - -/** - * CatAllOf - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaMSF4JServerCodegen") -public class CatAllOf { - @JsonProperty("declawed") - private Boolean declawed; - - public CatAllOf declawed(Boolean declawed) { - this.declawed = declawed; - return this; - } - - /** - * Get declawed - * @return declawed - **/ - @ApiModelProperty(value = "") - public Boolean getDeclawed() { - return declawed; - } - - public void setDeclawed(Boolean declawed) { - this.declawed = declawed; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CatAllOf catAllOf = (CatAllOf) o; - return Objects.equals(this.declawed, catAllOf.declawed); - } - - @Override - public int hashCode() { - return Objects.hash(declawed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CatAllOf {\n"); - - sb.append(" declawed: ").append(toIndentedString(declawed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/model/DogAllOf.java b/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/model/DogAllOf.java deleted file mode 100644 index f3a99940bdc..00000000000 --- a/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/model/DogAllOf.java +++ /dev/null @@ -1,75 +0,0 @@ -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.JsonTypeName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; - -/** - * DogAllOf - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaMSF4JServerCodegen") -public class DogAllOf { - @JsonProperty("breed") - private String breed; - - public DogAllOf breed(String breed) { - this.breed = breed; - return this; - } - - /** - * Get breed - * @return breed - **/ - @ApiModelProperty(value = "") - public String getBreed() { - return breed; - } - - public void setBreed(String breed) { - this.breed = breed; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DogAllOf dogAllOf = (DogAllOf) o; - return Objects.equals(this.breed, dogAllOf.breed); - } - - @Override - public int hashCode() { - return Objects.hash(breed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DogAllOf {\n"); - - sb.append(" breed: ").append(toIndentedString(breed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/.openapi-generator/FILES b/samples/server/petstore/java-play-framework-fake-endpoints/.openapi-generator/FILES index 5edfb3d0fc8..a279cc19ff0 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/.openapi-generator/FILES +++ b/samples/server/petstore/java-play-framework-fake-endpoints/.openapi-generator/FILES @@ -14,15 +14,12 @@ app/apimodels/ArrayOfArrayOfNumberOnly.java app/apimodels/ArrayOfNumberOnly.java app/apimodels/ArrayTest.java app/apimodels/BigCat.java -app/apimodels/BigCatAllOf.java app/apimodels/Capitalization.java app/apimodels/Cat.java -app/apimodels/CatAllOf.java app/apimodels/Category.java app/apimodels/ClassModel.java app/apimodels/Client.java app/apimodels/Dog.java -app/apimodels/DogAllOf.java app/apimodels/EnumArrays.java app/apimodels/EnumClass.java app/apimodels/EnumTest.java diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/BigCatAllOf.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/BigCatAllOf.java deleted file mode 100644 index 87f0924badd..00000000000 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/BigCatAllOf.java +++ /dev/null @@ -1,111 +0,0 @@ -package apimodels; - -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.*; -import java.util.Set; -import javax.validation.*; -import java.util.Objects; -import javax.validation.constraints.*; -/** - * BigCatAllOf - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaPlayFrameworkCodegen") -@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"}) -public class BigCatAllOf { - /** - * Gets or Sets kind - */ - public enum KindEnum { - LIONS("lions"), - - TIGERS("tigers"), - - LEOPARDS("leopards"), - - JAGUARS("jaguars"); - - private final String value; - - KindEnum(String value) { - this.value = value; - } - - @Override - @JsonValue - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static KindEnum fromValue(String value) { - for (KindEnum b : KindEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - @JsonProperty("kind") - - private KindEnum kind; - - public BigCatAllOf kind(KindEnum kind) { - this.kind = kind; - return this; - } - - /** - * Get kind - * @return kind - **/ - public KindEnum getKind() { - return kind; - } - - public void setKind(KindEnum kind) { - this.kind = kind; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BigCatAllOf bigCatAllOf = (BigCatAllOf) o; - return Objects.equals(kind, bigCatAllOf.kind); - } - - @Override - public int hashCode() { - return Objects.hash(kind); - } - - @SuppressWarnings("StringBufferReplaceableByString") - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BigCatAllOf {\n"); - - sb.append(" kind: ").append(toIndentedString(kind)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/CatAllOf.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/CatAllOf.java deleted file mode 100644 index 34865f24182..00000000000 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/CatAllOf.java +++ /dev/null @@ -1,76 +0,0 @@ -package apimodels; - -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.*; -import java.util.Set; -import javax.validation.*; -import java.util.Objects; -import javax.validation.constraints.*; -/** - * CatAllOf - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaPlayFrameworkCodegen") -@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"}) -public class CatAllOf { - @JsonProperty("declawed") - - private Boolean declawed; - - public CatAllOf declawed(Boolean declawed) { - this.declawed = declawed; - return this; - } - - /** - * Get declawed - * @return declawed - **/ - public Boolean getDeclawed() { - return declawed; - } - - public void setDeclawed(Boolean declawed) { - this.declawed = declawed; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CatAllOf catAllOf = (CatAllOf) o; - return Objects.equals(declawed, catAllOf.declawed); - } - - @Override - public int hashCode() { - return Objects.hash(declawed); - } - - @SuppressWarnings("StringBufferReplaceableByString") - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CatAllOf {\n"); - - sb.append(" declawed: ").append(toIndentedString(declawed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/DogAllOf.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/DogAllOf.java deleted file mode 100644 index 111696fa0a6..00000000000 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/DogAllOf.java +++ /dev/null @@ -1,76 +0,0 @@ -package apimodels; - -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.*; -import java.util.Set; -import javax.validation.*; -import java.util.Objects; -import javax.validation.constraints.*; -/** - * DogAllOf - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaPlayFrameworkCodegen") -@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"}) -public class DogAllOf { - @JsonProperty("breed") - - private String breed; - - public DogAllOf breed(String breed) { - this.breed = breed; - return this; - } - - /** - * Get breed - * @return breed - **/ - public String getBreed() { - return breed; - } - - public void setBreed(String breed) { - this.breed = breed; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DogAllOf dogAllOf = (DogAllOf) o; - return Objects.equals(breed, dogAllOf.breed); - } - - @Override - public int hashCode() { - return Objects.hash(breed); - } - - @SuppressWarnings("StringBufferReplaceableByString") - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DogAllOf {\n"); - - sb.append(" breed: ").append(toIndentedString(breed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/public/openapi.json b/samples/server/petstore/java-play-framework-fake-endpoints/public/openapi.json index 2e6dec7bc59..7fec58decc9 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/public/openapi.json +++ b/samples/server/petstore/java-play-framework-fake-endpoints/public/openapi.json @@ -1791,21 +1791,37 @@ "allOf" : [ { "$ref" : "#/components/schemas/Animal" }, { - "$ref" : "#/components/schemas/Dog_allOf" + "properties" : { + "breed" : { + "type" : "string" + } + }, + "type" : "object" } ] }, "Cat" : { "allOf" : [ { "$ref" : "#/components/schemas/Animal" }, { - "$ref" : "#/components/schemas/Cat_allOf" + "properties" : { + "declawed" : { + "type" : "boolean" + } + }, + "type" : "object" } ] }, "BigCat" : { "allOf" : [ { "$ref" : "#/components/schemas/Cat" }, { - "$ref" : "#/components/schemas/BigCat_allOf" + "properties" : { + "kind" : { + "enum" : [ "lions", "tigers", "leopards", "jaguars" ], + "type" : "string" + } + }, + "type" : "object" } ] }, "Animal" : { @@ -2849,34 +2865,6 @@ }, "required" : [ "requiredFile" ], "type" : "object" - }, - "Dog_allOf" : { - "properties" : { - "breed" : { - "type" : "string" - } - }, - "type" : "object", - "example" : null - }, - "Cat_allOf" : { - "properties" : { - "declawed" : { - "type" : "boolean" - } - }, - "type" : "object", - "example" : null - }, - "BigCat_allOf" : { - "properties" : { - "kind" : { - "enum" : [ "lions", "tigers", "leopards", "jaguars" ], - "type" : "string" - } - }, - "type" : "object", - "example" : null } }, "securitySchemes" : { diff --git a/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/BigCatAllOf.java b/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/BigCatAllOf.java deleted file mode 100644 index 5013641cb31..00000000000 --- a/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/BigCatAllOf.java +++ /dev/null @@ -1,95 +0,0 @@ -package org.openapitools.model; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import javax.validation.constraints.*; -import javax.validation.Valid; - -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonFormat; -import com.fasterxml.jackson.annotation.JsonProperty; - - -public class BigCatAllOf { - -public enum KindEnum { - - @JsonProperty("lions") LIONS(String.valueOf("lions")), - @JsonProperty("tigers") TIGERS(String.valueOf("tigers")), - @JsonProperty("leopards") LEOPARDS(String.valueOf("leopards")), - @JsonProperty("jaguars") JAGUARS(String.valueOf("jaguars")); - - private String value; - - KindEnum (String v) { - value = v; - } - - public String value() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static KindEnum fromValue(String value) { - for (KindEnum b : KindEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} - - @ApiModelProperty(value = "") - private KindEnum kind; - /** - * Get kind - * @return kind - */ - @JsonProperty("kind") - public String getKind() { - return kind == null ? null : kind.value(); - } - - /** - * Sets the kind property. - */ - public void setKind(KindEnum kind) { - this.kind = kind; - } - - /** - * Sets the kind property. - */ - public BigCatAllOf kind(KindEnum kind) { - this.kind = kind; - return this; - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BigCatAllOf {\n"); - - sb.append(" kind: ").append(toIndentedString(kind)).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 static String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/CatAllOf.java deleted file mode 100644 index a5429c99537..00000000000 --- a/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/CatAllOf.java +++ /dev/null @@ -1,61 +0,0 @@ -package org.openapitools.model; - -import javax.validation.constraints.*; -import javax.validation.Valid; - -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonFormat; -import com.fasterxml.jackson.annotation.JsonProperty; - - -public class CatAllOf { - - @ApiModelProperty(value = "") - private Boolean declawed; - /** - * Get declawed - * @return declawed - */ - @JsonProperty("declawed") - public Boolean getDeclawed() { - return declawed; - } - - /** - * Sets the declawed property. - */ - public void setDeclawed(Boolean declawed) { - this.declawed = declawed; - } - - /** - * Sets the declawed property. - */ - public CatAllOf declawed(Boolean declawed) { - this.declawed = declawed; - return this; - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CatAllOf {\n"); - - sb.append(" declawed: ").append(toIndentedString(declawed)).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 static String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/DogAllOf.java b/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/DogAllOf.java deleted file mode 100644 index c0d1aa500c7..00000000000 --- a/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/DogAllOf.java +++ /dev/null @@ -1,61 +0,0 @@ -package org.openapitools.model; - -import javax.validation.constraints.*; -import javax.validation.Valid; - -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonFormat; -import com.fasterxml.jackson.annotation.JsonProperty; - - -public class DogAllOf { - - @ApiModelProperty(value = "") - private String breed; - /** - * Get breed - * @return breed - */ - @JsonProperty("breed") - public String getBreed() { - return breed; - } - - /** - * Sets the breed property. - */ - public void setBreed(String breed) { - this.breed = breed; - } - - /** - * Sets the breed property. - */ - public DogAllOf breed(String breed) { - this.breed = breed; - return this; - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DogAllOf {\n"); - - sb.append(" breed: ").append(toIndentedString(breed)).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 static String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/jaxrs-cxf/.openapi-generator/FILES b/samples/server/petstore/jaxrs-cxf/.openapi-generator/FILES index 95d35eca2bc..ec84cfdf3cf 100644 --- a/samples/server/petstore/jaxrs-cxf/.openapi-generator/FILES +++ b/samples/server/petstore/jaxrs-cxf/.openapi-generator/FILES @@ -19,15 +19,12 @@ src/gen/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java src/gen/java/org/openapitools/model/ArrayOfNumberOnly.java src/gen/java/org/openapitools/model/ArrayTest.java src/gen/java/org/openapitools/model/BigCat.java -src/gen/java/org/openapitools/model/BigCatAllOf.java src/gen/java/org/openapitools/model/Capitalization.java src/gen/java/org/openapitools/model/Cat.java -src/gen/java/org/openapitools/model/CatAllOf.java src/gen/java/org/openapitools/model/Category.java src/gen/java/org/openapitools/model/ClassModel.java src/gen/java/org/openapitools/model/Client.java src/gen/java/org/openapitools/model/Dog.java -src/gen/java/org/openapitools/model/DogAllOf.java src/gen/java/org/openapitools/model/EnumArrays.java src/gen/java/org/openapitools/model/EnumClass.java src/gen/java/org/openapitools/model/EnumTest.java diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/BigCatAllOf.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/BigCatAllOf.java deleted file mode 100644 index 18eb9f2f5be..00000000000 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/BigCatAllOf.java +++ /dev/null @@ -1,109 +0,0 @@ -package org.openapitools.model; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import javax.validation.constraints.*; -import javax.validation.Valid; - -import io.swagger.annotations.ApiModelProperty; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; - - -public class BigCatAllOf { - -public enum KindEnum { - -LIONS(String.valueOf("lions")), TIGERS(String.valueOf("tigers")), LEOPARDS(String.valueOf("leopards")), JAGUARS(String.valueOf("jaguars")); - - - private String value; - - KindEnum (String v) { - value = v; - } - - public String value() { - return value; - } - - @Override - @JsonValue - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static KindEnum fromValue(String value) { - for (KindEnum b : KindEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} - - @ApiModelProperty(value = "") - private KindEnum kind; - /** - * Get kind - * @return kind - **/ - @JsonProperty("kind") - public String getKind() { - if (kind == null) { - return null; - } - return kind.value(); - } - - public void setKind(KindEnum kind) { - this.kind = kind; - } - - public BigCatAllOf kind(KindEnum kind) { - this.kind = kind; - return this; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BigCatAllOf bigCatAllOf = (BigCatAllOf) o; - return Objects.equals(kind, bigCatAllOf.kind); - } - - @Override - public int hashCode() { - return Objects.hash(kind); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BigCatAllOf {\n"); - - sb.append(" kind: ").append(toIndentedString(kind)).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 static String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/CatAllOf.java deleted file mode 100644 index 96cde07730d..00000000000 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/CatAllOf.java +++ /dev/null @@ -1,72 +0,0 @@ -package org.openapitools.model; - -import com.fasterxml.jackson.annotation.JsonTypeName; -import javax.validation.constraints.*; -import javax.validation.Valid; - -import io.swagger.annotations.ApiModelProperty; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; - - -public class CatAllOf { - - @ApiModelProperty(value = "") - private Boolean declawed; - /** - * Get declawed - * @return declawed - **/ - @JsonProperty("declawed") - public Boolean getDeclawed() { - return declawed; - } - - public void setDeclawed(Boolean declawed) { - this.declawed = declawed; - } - - public CatAllOf declawed(Boolean declawed) { - this.declawed = declawed; - return this; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CatAllOf catAllOf = (CatAllOf) o; - return Objects.equals(declawed, catAllOf.declawed); - } - - @Override - public int hashCode() { - return Objects.hash(declawed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CatAllOf {\n"); - - sb.append(" declawed: ").append(toIndentedString(declawed)).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 static String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/DogAllOf.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/DogAllOf.java deleted file mode 100644 index cc9268c5a4c..00000000000 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/model/DogAllOf.java +++ /dev/null @@ -1,72 +0,0 @@ -package org.openapitools.model; - -import com.fasterxml.jackson.annotation.JsonTypeName; -import javax.validation.constraints.*; -import javax.validation.Valid; - -import io.swagger.annotations.ApiModelProperty; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; - - -public class DogAllOf { - - @ApiModelProperty(value = "") - private String breed; - /** - * Get breed - * @return breed - **/ - @JsonProperty("breed") - public String getBreed() { - return breed; - } - - public void setBreed(String breed) { - this.breed = breed; - } - - public DogAllOf breed(String breed) { - this.breed = breed; - return this; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DogAllOf dogAllOf = (DogAllOf) o; - return Objects.equals(breed, dogAllOf.breed); - } - - @Override - public int hashCode() { - return Objects.hash(breed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DogAllOf {\n"); - - sb.append(" breed: ").append(toIndentedString(breed)).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 static String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/jaxrs-datelib-j8/.openapi-generator/FILES b/samples/server/petstore/jaxrs-datelib-j8/.openapi-generator/FILES index 18ef9ada56a..9f6322ea122 100644 --- a/samples/server/petstore/jaxrs-datelib-j8/.openapi-generator/FILES +++ b/samples/server/petstore/jaxrs-datelib-j8/.openapi-generator/FILES @@ -34,15 +34,12 @@ src/gen/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java src/gen/java/org/openapitools/model/ArrayOfNumberOnly.java src/gen/java/org/openapitools/model/ArrayTest.java src/gen/java/org/openapitools/model/BigCat.java -src/gen/java/org/openapitools/model/BigCatAllOf.java src/gen/java/org/openapitools/model/Capitalization.java src/gen/java/org/openapitools/model/Cat.java -src/gen/java/org/openapitools/model/CatAllOf.java src/gen/java/org/openapitools/model/Category.java src/gen/java/org/openapitools/model/ClassModel.java src/gen/java/org/openapitools/model/Client.java src/gen/java/org/openapitools/model/Dog.java -src/gen/java/org/openapitools/model/DogAllOf.java src/gen/java/org/openapitools/model/EnumArrays.java src/gen/java/org/openapitools/model/EnumClass.java src/gen/java/org/openapitools/model/EnumTest.java diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/BigCatAllOf.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/BigCatAllOf.java deleted file mode 100644 index 8fe84c942a2..00000000000 --- a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/BigCatAllOf.java +++ /dev/null @@ -1,134 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import java.io.Serializable; -import javax.validation.constraints.*; -import javax.validation.Valid; - -/** - * BigCatAllOf - */ -@JsonPropertyOrder({ - BigCatAllOf.JSON_PROPERTY_KIND -}) -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen") -public class BigCatAllOf implements Serializable { - /** - * Gets or Sets kind - */ - public enum KindEnum { - LIONS("lions"), - - TIGERS("tigers"), - - LEOPARDS("leopards"), - - JAGUARS("jaguars"); - - private String value; - - KindEnum(String value) { - this.value = value; - } - - @Override - @JsonValue - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static KindEnum fromValue(String value) { - for (KindEnum b : KindEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - public static final String JSON_PROPERTY_KIND = "kind"; - @JsonProperty(JSON_PROPERTY_KIND) - private KindEnum kind; - - public BigCatAllOf kind(KindEnum kind) { - this.kind = kind; - return this; - } - - /** - * Get kind - * @return kind - **/ - @JsonProperty(value = "kind") - @ApiModelProperty(value = "") - - public KindEnum getKind() { - return kind; - } - - public void setKind(KindEnum kind) { - this.kind = kind; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BigCatAllOf bigCatAllOf = (BigCatAllOf) o; - return Objects.equals(this.kind, bigCatAllOf.kind); - } - - @Override - public int hashCode() { - return Objects.hash(kind); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BigCatAllOf {\n"); - - sb.append(" kind: ").append(toIndentedString(kind)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/CatAllOf.java deleted file mode 100644 index 42243e5b424..00000000000 --- a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/CatAllOf.java +++ /dev/null @@ -1,98 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.JsonTypeName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import java.io.Serializable; -import javax.validation.constraints.*; -import javax.validation.Valid; - -/** - * CatAllOf - */ -@JsonPropertyOrder({ - CatAllOf.JSON_PROPERTY_DECLAWED -}) -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen") -public class CatAllOf implements Serializable { - public static final String JSON_PROPERTY_DECLAWED = "declawed"; - @JsonProperty(JSON_PROPERTY_DECLAWED) - private Boolean declawed; - - public CatAllOf declawed(Boolean declawed) { - this.declawed = declawed; - return this; - } - - /** - * Get declawed - * @return declawed - **/ - @JsonProperty(value = "declawed") - @ApiModelProperty(value = "") - - public Boolean getDeclawed() { - return declawed; - } - - public void setDeclawed(Boolean declawed) { - this.declawed = declawed; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CatAllOf catAllOf = (CatAllOf) o; - return Objects.equals(this.declawed, catAllOf.declawed); - } - - @Override - public int hashCode() { - return Objects.hash(declawed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CatAllOf {\n"); - - sb.append(" declawed: ").append(toIndentedString(declawed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/DogAllOf.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/DogAllOf.java deleted file mode 100644 index 0265cacab58..00000000000 --- a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/DogAllOf.java +++ /dev/null @@ -1,98 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.JsonTypeName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import java.io.Serializable; -import javax.validation.constraints.*; -import javax.validation.Valid; - -/** - * DogAllOf - */ -@JsonPropertyOrder({ - DogAllOf.JSON_PROPERTY_BREED -}) -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen") -public class DogAllOf implements Serializable { - public static final String JSON_PROPERTY_BREED = "breed"; - @JsonProperty(JSON_PROPERTY_BREED) - private String breed; - - public DogAllOf breed(String breed) { - this.breed = breed; - return this; - } - - /** - * Get breed - * @return breed - **/ - @JsonProperty(value = "breed") - @ApiModelProperty(value = "") - - public String getBreed() { - return breed; - } - - public void setBreed(String breed) { - this.breed = breed; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DogAllOf dogAllOf = (DogAllOf) o; - return Objects.equals(this.breed, dogAllOf.breed); - } - - @Override - public int hashCode() { - return Objects.hash(breed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DogAllOf {\n"); - - sb.append(" breed: ").append(toIndentedString(breed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/jaxrs-jersey/.openapi-generator/FILES b/samples/server/petstore/jaxrs-jersey/.openapi-generator/FILES index 8992d0d741c..c991a1e399e 100644 --- a/samples/server/petstore/jaxrs-jersey/.openapi-generator/FILES +++ b/samples/server/petstore/jaxrs-jersey/.openapi-generator/FILES @@ -29,13 +29,11 @@ src/gen/java/org/openapitools/model/ArrayOfNumberOnly.java src/gen/java/org/openapitools/model/ArrayTest.java src/gen/java/org/openapitools/model/Capitalization.java src/gen/java/org/openapitools/model/Cat.java -src/gen/java/org/openapitools/model/CatAllOf.java src/gen/java/org/openapitools/model/Category.java src/gen/java/org/openapitools/model/ClassModel.java src/gen/java/org/openapitools/model/Client.java src/gen/java/org/openapitools/model/DeprecatedObject.java src/gen/java/org/openapitools/model/Dog.java -src/gen/java/org/openapitools/model/DogAllOf.java src/gen/java/org/openapitools/model/EnumArrays.java src/gen/java/org/openapitools/model/EnumClass.java src/gen/java/org/openapitools/model/EnumTest.java diff --git a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/model/CatAllOf.java deleted file mode 100644 index 92db279ac2d..00000000000 --- a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/model/CatAllOf.java +++ /dev/null @@ -1,97 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.JsonTypeName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import javax.validation.constraints.*; -import javax.validation.Valid; - -/** - * CatAllOf - */ -@JsonPropertyOrder({ - CatAllOf.JSON_PROPERTY_DECLAWED -}) -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen") -public class CatAllOf { - public static final String JSON_PROPERTY_DECLAWED = "declawed"; - @JsonProperty(JSON_PROPERTY_DECLAWED) - private Boolean declawed; - - public CatAllOf declawed(Boolean declawed) { - this.declawed = declawed; - return this; - } - - /** - * Get declawed - * @return declawed - **/ - @JsonProperty(value = "declawed") - @ApiModelProperty(value = "") - - public Boolean getDeclawed() { - return declawed; - } - - public void setDeclawed(Boolean declawed) { - this.declawed = declawed; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CatAllOf catAllOf = (CatAllOf) o; - return Objects.equals(this.declawed, catAllOf.declawed); - } - - @Override - public int hashCode() { - return Objects.hash(declawed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CatAllOf {\n"); - - sb.append(" declawed: ").append(toIndentedString(declawed)).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(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/DogAllOf.java b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/model/DogAllOf.java deleted file mode 100644 index 597a9cc1345..00000000000 --- a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/model/DogAllOf.java +++ /dev/null @@ -1,97 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.JsonTypeName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import javax.validation.constraints.*; -import javax.validation.Valid; - -/** - * DogAllOf - */ -@JsonPropertyOrder({ - DogAllOf.JSON_PROPERTY_BREED -}) -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen") -public class DogAllOf { - public static final String JSON_PROPERTY_BREED = "breed"; - @JsonProperty(JSON_PROPERTY_BREED) - private String breed; - - public DogAllOf breed(String breed) { - this.breed = breed; - return this; - } - - /** - * Get breed - * @return breed - **/ - @JsonProperty(value = "breed") - @ApiModelProperty(value = "") - - public String getBreed() { - return breed; - } - - public void setBreed(String breed) { - this.breed = breed; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DogAllOf dogAllOf = (DogAllOf) o; - return Objects.equals(this.breed, dogAllOf.breed); - } - - @Override - public int hashCode() { - return Objects.hash(breed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DogAllOf {\n"); - - sb.append(" breed: ").append(toIndentedString(breed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/BigCatAllOf.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/BigCatAllOf.java deleted file mode 100644 index 21427933a94..00000000000 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/BigCatAllOf.java +++ /dev/null @@ -1,131 +0,0 @@ -package org.openapitools.model; - -import com.fasterxml.jackson.annotation.JsonTypeName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.Serializable; -import javax.validation.constraints.*; -import javax.validation.Valid; - -import io.swagger.annotations.*; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.annotation.JsonTypeName; - - - -@JsonTypeName("BigCat_allOf") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") -public class BigCatAllOf implements Serializable { - public enum KindEnum { - - LIONS(String.valueOf("lions")), TIGERS(String.valueOf("tigers")), LEOPARDS(String.valueOf("leopards")), JAGUARS(String.valueOf("jaguars")); - - - private String value; - - KindEnum (String v) { - value = v; - } - - public String value() { - return value; - } - - @Override - @JsonValue - public String toString() { - return String.valueOf(value); - } - - /** - * Convert a String into String, as specified in the - * See JAX RS 2.0 Specification, section 3.2, p. 12 - */ - public static KindEnum fromString(String s) { - for (KindEnum b : KindEnum.values()) { - // using Objects.toString() to be safe if value type non-object type - // because types like 'int' etc. will be auto-boxed - if (java.util.Objects.toString(b.value).equals(s)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected string value '" + s + "'"); - } - - @JsonCreator - public static KindEnum fromValue(String value) { - for (KindEnum b : KindEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} - - private @Valid KindEnum kind; - - /** - **/ - public BigCatAllOf kind(KindEnum kind) { - this.kind = kind; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("kind") - public KindEnum getKind() { - return kind; - } - - @JsonProperty("kind") - public void setKind(KindEnum kind) { - this.kind = kind; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BigCatAllOf bigCatAllOf = (BigCatAllOf) o; - return Objects.equals(this.kind, bigCatAllOf.kind); - } - - @Override - public int hashCode() { - return Objects.hash(kind); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BigCatAllOf {\n"); - - sb.append(" kind: ").append(toIndentedString(kind)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - -} - diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/CatAllOf.java deleted file mode 100644 index 491b09cbbaf..00000000000 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/CatAllOf.java +++ /dev/null @@ -1,84 +0,0 @@ -package org.openapitools.model; - -import com.fasterxml.jackson.annotation.JsonTypeName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.Serializable; -import javax.validation.constraints.*; -import javax.validation.Valid; - -import io.swagger.annotations.*; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.annotation.JsonTypeName; - - - -@JsonTypeName("Cat_allOf") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") -public class CatAllOf implements Serializable { - private @Valid Boolean declawed; - - /** - **/ - public CatAllOf declawed(Boolean declawed) { - this.declawed = declawed; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("declawed") - public Boolean getDeclawed() { - return declawed; - } - - @JsonProperty("declawed") - public void setDeclawed(Boolean declawed) { - this.declawed = declawed; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CatAllOf catAllOf = (CatAllOf) o; - return Objects.equals(this.declawed, catAllOf.declawed); - } - - @Override - public int hashCode() { - return Objects.hash(declawed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CatAllOf {\n"); - - sb.append(" declawed: ").append(toIndentedString(declawed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - -} - diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/DogAllOf.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/DogAllOf.java deleted file mode 100644 index a2e595a8a1a..00000000000 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/model/DogAllOf.java +++ /dev/null @@ -1,84 +0,0 @@ -package org.openapitools.model; - -import com.fasterxml.jackson.annotation.JsonTypeName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.Serializable; -import javax.validation.constraints.*; -import javax.validation.Valid; - -import io.swagger.annotations.*; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.annotation.JsonTypeName; - - - -@JsonTypeName("Dog_allOf") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") -public class DogAllOf implements Serializable { - private @Valid String breed; - - /** - **/ - public DogAllOf breed(String breed) { - this.breed = breed; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("breed") - public String getBreed() { - return breed; - } - - @JsonProperty("breed") - public void setBreed(String breed) { - this.breed = breed; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DogAllOf dogAllOf = (DogAllOf) o; - return Objects.equals(this.breed, dogAllOf.breed); - } - - @Override - public int hashCode() { - return Objects.hash(breed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DogAllOf {\n"); - - sb.append(" breed: ").append(toIndentedString(breed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - -} - diff --git a/samples/server/petstore/jaxrs-spec-interface/.openapi-generator/FILES b/samples/server/petstore/jaxrs-spec-interface/.openapi-generator/FILES index a5460bdf420..f7f670f582e 100644 --- a/samples/server/petstore/jaxrs-spec-interface/.openapi-generator/FILES +++ b/samples/server/petstore/jaxrs-spec-interface/.openapi-generator/FILES @@ -20,15 +20,12 @@ src/gen/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java src/gen/java/org/openapitools/model/ArrayOfNumberOnly.java src/gen/java/org/openapitools/model/ArrayTest.java src/gen/java/org/openapitools/model/BigCat.java -src/gen/java/org/openapitools/model/BigCatAllOf.java src/gen/java/org/openapitools/model/Capitalization.java src/gen/java/org/openapitools/model/Cat.java -src/gen/java/org/openapitools/model/CatAllOf.java src/gen/java/org/openapitools/model/Category.java src/gen/java/org/openapitools/model/ClassModel.java src/gen/java/org/openapitools/model/Client.java src/gen/java/org/openapitools/model/Dog.java -src/gen/java/org/openapitools/model/DogAllOf.java src/gen/java/org/openapitools/model/EnumArrays.java src/gen/java/org/openapitools/model/EnumClass.java src/gen/java/org/openapitools/model/EnumTest.java diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/BigCatAllOf.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/BigCatAllOf.java deleted file mode 100644 index 21427933a94..00000000000 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/BigCatAllOf.java +++ /dev/null @@ -1,131 +0,0 @@ -package org.openapitools.model; - -import com.fasterxml.jackson.annotation.JsonTypeName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.Serializable; -import javax.validation.constraints.*; -import javax.validation.Valid; - -import io.swagger.annotations.*; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.annotation.JsonTypeName; - - - -@JsonTypeName("BigCat_allOf") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") -public class BigCatAllOf implements Serializable { - public enum KindEnum { - - LIONS(String.valueOf("lions")), TIGERS(String.valueOf("tigers")), LEOPARDS(String.valueOf("leopards")), JAGUARS(String.valueOf("jaguars")); - - - private String value; - - KindEnum (String v) { - value = v; - } - - public String value() { - return value; - } - - @Override - @JsonValue - public String toString() { - return String.valueOf(value); - } - - /** - * Convert a String into String, as specified in the - * See JAX RS 2.0 Specification, section 3.2, p. 12 - */ - public static KindEnum fromString(String s) { - for (KindEnum b : KindEnum.values()) { - // using Objects.toString() to be safe if value type non-object type - // because types like 'int' etc. will be auto-boxed - if (java.util.Objects.toString(b.value).equals(s)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected string value '" + s + "'"); - } - - @JsonCreator - public static KindEnum fromValue(String value) { - for (KindEnum b : KindEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} - - private @Valid KindEnum kind; - - /** - **/ - public BigCatAllOf kind(KindEnum kind) { - this.kind = kind; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("kind") - public KindEnum getKind() { - return kind; - } - - @JsonProperty("kind") - public void setKind(KindEnum kind) { - this.kind = kind; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BigCatAllOf bigCatAllOf = (BigCatAllOf) o; - return Objects.equals(this.kind, bigCatAllOf.kind); - } - - @Override - public int hashCode() { - return Objects.hash(kind); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BigCatAllOf {\n"); - - sb.append(" kind: ").append(toIndentedString(kind)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - -} - diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/CatAllOf.java deleted file mode 100644 index 491b09cbbaf..00000000000 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/CatAllOf.java +++ /dev/null @@ -1,84 +0,0 @@ -package org.openapitools.model; - -import com.fasterxml.jackson.annotation.JsonTypeName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.Serializable; -import javax.validation.constraints.*; -import javax.validation.Valid; - -import io.swagger.annotations.*; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.annotation.JsonTypeName; - - - -@JsonTypeName("Cat_allOf") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") -public class CatAllOf implements Serializable { - private @Valid Boolean declawed; - - /** - **/ - public CatAllOf declawed(Boolean declawed) { - this.declawed = declawed; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("declawed") - public Boolean getDeclawed() { - return declawed; - } - - @JsonProperty("declawed") - public void setDeclawed(Boolean declawed) { - this.declawed = declawed; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CatAllOf catAllOf = (CatAllOf) o; - return Objects.equals(this.declawed, catAllOf.declawed); - } - - @Override - public int hashCode() { - return Objects.hash(declawed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CatAllOf {\n"); - - sb.append(" declawed: ").append(toIndentedString(declawed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - -} - diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/DogAllOf.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/DogAllOf.java deleted file mode 100644 index a2e595a8a1a..00000000000 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/model/DogAllOf.java +++ /dev/null @@ -1,84 +0,0 @@ -package org.openapitools.model; - -import com.fasterxml.jackson.annotation.JsonTypeName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.Serializable; -import javax.validation.constraints.*; -import javax.validation.Valid; - -import io.swagger.annotations.*; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.annotation.JsonTypeName; - - - -@JsonTypeName("Dog_allOf") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") -public class DogAllOf implements Serializable { - private @Valid String breed; - - /** - **/ - public DogAllOf breed(String breed) { - this.breed = breed; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("breed") - public String getBreed() { - return breed; - } - - @JsonProperty("breed") - public void setBreed(String breed) { - this.breed = breed; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DogAllOf dogAllOf = (DogAllOf) o; - return Objects.equals(this.breed, dogAllOf.breed); - } - - @Override - public int hashCode() { - return Objects.hash(breed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DogAllOf {\n"); - - sb.append(" breed: ").append(toIndentedString(breed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - -} - diff --git a/samples/server/petstore/jaxrs-spec-interface/src/main/openapi/openapi.yaml b/samples/server/petstore/jaxrs-spec-interface/src/main/openapi/openapi.yaml index 658d8a96b30..eded577e74f 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/main/openapi/openapi.yaml +++ b/samples/server/petstore/jaxrs-spec-interface/src/main/openapi/openapi.yaml @@ -1438,15 +1438,29 @@ components: Dog: allOf: - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Dog_allOf' + - properties: + breed: + type: string + type: object Cat: allOf: - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Cat_allOf' + - properties: + declawed: + type: boolean + type: object BigCat: allOf: - $ref: '#/components/schemas/Cat' - - $ref: '#/components/schemas/BigCat_allOf' + - properties: + kind: + enum: + - lions + - tigers + - leopards + - jaguars + type: string + type: object Animal: discriminator: propertyName: className @@ -2239,29 +2253,6 @@ components: required: - requiredFile type: object - Dog_allOf: - properties: - breed: - type: string - type: object - example: null - Cat_allOf: - properties: - declawed: - type: boolean - type: object - example: null - BigCat_allOf: - properties: - kind: - enum: - - lions - - tigers - - leopards - - jaguars - type: string - type: object - example: null securitySchemes: petstore_auth: flows: diff --git a/samples/server/petstore/jaxrs-spec-jakarta/.openapi-generator/FILES b/samples/server/petstore/jaxrs-spec-jakarta/.openapi-generator/FILES index cf689a825e5..3ed6ff4d23c 100644 --- a/samples/server/petstore/jaxrs-spec-jakarta/.openapi-generator/FILES +++ b/samples/server/petstore/jaxrs-spec-jakarta/.openapi-generator/FILES @@ -21,15 +21,12 @@ src/gen/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java src/gen/java/org/openapitools/model/ArrayOfNumberOnly.java src/gen/java/org/openapitools/model/ArrayTest.java src/gen/java/org/openapitools/model/BigCat.java -src/gen/java/org/openapitools/model/BigCatAllOf.java src/gen/java/org/openapitools/model/Capitalization.java src/gen/java/org/openapitools/model/Cat.java -src/gen/java/org/openapitools/model/CatAllOf.java src/gen/java/org/openapitools/model/Category.java src/gen/java/org/openapitools/model/ClassModel.java src/gen/java/org/openapitools/model/Client.java src/gen/java/org/openapitools/model/Dog.java -src/gen/java/org/openapitools/model/DogAllOf.java src/gen/java/org/openapitools/model/EnumArrays.java src/gen/java/org/openapitools/model/EnumClass.java src/gen/java/org/openapitools/model/EnumTest.java diff --git a/samples/server/petstore/jaxrs-spec-jakarta/src/gen/java/org/openapitools/model/BigCatAllOf.java b/samples/server/petstore/jaxrs-spec-jakarta/src/gen/java/org/openapitools/model/BigCatAllOf.java deleted file mode 100644 index 199a84c90d5..00000000000 --- a/samples/server/petstore/jaxrs-spec-jakarta/src/gen/java/org/openapitools/model/BigCatAllOf.java +++ /dev/null @@ -1,166 +0,0 @@ -package org.openapitools.model; - -import com.fasterxml.jackson.annotation.JsonTypeName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.Serializable; -import jakarta.validation.constraints.*; -import jakarta.validation.Valid; - -import io.swagger.annotations.*; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.annotation.JsonTypeName; - - - -@JsonTypeName("BigCat_allOf") -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") -public class BigCatAllOf implements Serializable { - public enum KindEnum { - - LIONS(String.valueOf("lions")), TIGERS(String.valueOf("tigers")), LEOPARDS(String.valueOf("leopards")), JAGUARS(String.valueOf("jaguars")); - - - private String value; - - KindEnum (String v) { - value = v; - } - - public String value() { - return value; - } - - @Override - @JsonValue - public String toString() { - return String.valueOf(value); - } - - /** - * Convert a String into String, as specified in the - * See JAX RS 2.0 Specification, section 3.2, p. 12 - */ - public static KindEnum fromString(String s) { - for (KindEnum b : KindEnum.values()) { - // using Objects.toString() to be safe if value type non-object type - // because types like 'int' etc. will be auto-boxed - if (java.util.Objects.toString(b.value).equals(s)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected string value '" + s + "'"); - } - - @JsonCreator - public static KindEnum fromValue(String value) { - for (KindEnum b : KindEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} - - private @Valid KindEnum kind; - - protected BigCatAllOf(BigCatAllOfBuilder b) { - this.kind = b.kind; - } - - public BigCatAllOf() { - } - - /** - **/ - public BigCatAllOf kind(KindEnum kind) { - this.kind = kind; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("kind") - public KindEnum getKind() { - return kind; - } - - @JsonProperty("kind") - public void setKind(KindEnum kind) { - this.kind = kind; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BigCatAllOf bigCatAllOf = (BigCatAllOf) o; - return Objects.equals(this.kind, bigCatAllOf.kind); - } - - @Override - public int hashCode() { - return Objects.hash(kind); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BigCatAllOf {\n"); - - sb.append(" kind: ").append(toIndentedString(kind)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static BigCatAllOfBuilder builder() { - return new BigCatAllOfBuilderImpl(); - } - - private static final class BigCatAllOfBuilderImpl extends BigCatAllOfBuilder { - - @Override - protected BigCatAllOfBuilderImpl self() { - return this; - } - - @Override - public BigCatAllOf build() { - return new BigCatAllOf(this); - } - } - - public static abstract class BigCatAllOfBuilder> { - private KindEnum kind; - protected abstract B self(); - - public abstract C build(); - - public B kind(KindEnum kind) { - this.kind = kind; - return self(); - } - } -} - diff --git a/samples/server/petstore/jaxrs-spec-jakarta/src/gen/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/jaxrs-spec-jakarta/src/gen/java/org/openapitools/model/CatAllOf.java deleted file mode 100644 index b87e37b4a7a..00000000000 --- a/samples/server/petstore/jaxrs-spec-jakarta/src/gen/java/org/openapitools/model/CatAllOf.java +++ /dev/null @@ -1,119 +0,0 @@ -package org.openapitools.model; - -import com.fasterxml.jackson.annotation.JsonTypeName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.Serializable; -import jakarta.validation.constraints.*; -import jakarta.validation.Valid; - -import io.swagger.annotations.*; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.annotation.JsonTypeName; - - - -@JsonTypeName("Cat_allOf") -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") -public class CatAllOf implements Serializable { - private @Valid Boolean declawed; - - protected CatAllOf(CatAllOfBuilder b) { - this.declawed = b.declawed; - } - - public CatAllOf() { - } - - /** - **/ - public CatAllOf declawed(Boolean declawed) { - this.declawed = declawed; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("declawed") - public Boolean getDeclawed() { - return declawed; - } - - @JsonProperty("declawed") - public void setDeclawed(Boolean declawed) { - this.declawed = declawed; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CatAllOf catAllOf = (CatAllOf) o; - return Objects.equals(this.declawed, catAllOf.declawed); - } - - @Override - public int hashCode() { - return Objects.hash(declawed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CatAllOf {\n"); - - sb.append(" declawed: ").append(toIndentedString(declawed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static CatAllOfBuilder builder() { - return new CatAllOfBuilderImpl(); - } - - private static final class CatAllOfBuilderImpl extends CatAllOfBuilder { - - @Override - protected CatAllOfBuilderImpl self() { - return this; - } - - @Override - public CatAllOf build() { - return new CatAllOf(this); - } - } - - public static abstract class CatAllOfBuilder> { - private Boolean declawed; - protected abstract B self(); - - public abstract C build(); - - public B declawed(Boolean declawed) { - this.declawed = declawed; - return self(); - } - } -} - diff --git a/samples/server/petstore/jaxrs-spec-jakarta/src/gen/java/org/openapitools/model/DogAllOf.java b/samples/server/petstore/jaxrs-spec-jakarta/src/gen/java/org/openapitools/model/DogAllOf.java deleted file mode 100644 index 1e30918f2e3..00000000000 --- a/samples/server/petstore/jaxrs-spec-jakarta/src/gen/java/org/openapitools/model/DogAllOf.java +++ /dev/null @@ -1,119 +0,0 @@ -package org.openapitools.model; - -import com.fasterxml.jackson.annotation.JsonTypeName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.Serializable; -import jakarta.validation.constraints.*; -import jakarta.validation.Valid; - -import io.swagger.annotations.*; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.annotation.JsonTypeName; - - - -@JsonTypeName("Dog_allOf") -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") -public class DogAllOf implements Serializable { - private @Valid String breed; - - protected DogAllOf(DogAllOfBuilder b) { - this.breed = b.breed; - } - - public DogAllOf() { - } - - /** - **/ - public DogAllOf breed(String breed) { - this.breed = breed; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("breed") - public String getBreed() { - return breed; - } - - @JsonProperty("breed") - public void setBreed(String breed) { - this.breed = breed; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DogAllOf dogAllOf = (DogAllOf) o; - return Objects.equals(this.breed, dogAllOf.breed); - } - - @Override - public int hashCode() { - return Objects.hash(breed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DogAllOf {\n"); - - sb.append(" breed: ").append(toIndentedString(breed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static DogAllOfBuilder builder() { - return new DogAllOfBuilderImpl(); - } - - private static final class DogAllOfBuilderImpl extends DogAllOfBuilder { - - @Override - protected DogAllOfBuilderImpl self() { - return this; - } - - @Override - public DogAllOf build() { - return new DogAllOf(this); - } - } - - public static abstract class DogAllOfBuilder> { - private String breed; - protected abstract B self(); - - public abstract C build(); - - public B breed(String breed) { - this.breed = breed; - return self(); - } - } -} - diff --git a/samples/server/petstore/jaxrs-spec-jakarta/src/main/openapi/openapi.yaml b/samples/server/petstore/jaxrs-spec-jakarta/src/main/openapi/openapi.yaml index 658d8a96b30..eded577e74f 100644 --- a/samples/server/petstore/jaxrs-spec-jakarta/src/main/openapi/openapi.yaml +++ b/samples/server/petstore/jaxrs-spec-jakarta/src/main/openapi/openapi.yaml @@ -1438,15 +1438,29 @@ components: Dog: allOf: - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Dog_allOf' + - properties: + breed: + type: string + type: object Cat: allOf: - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Cat_allOf' + - properties: + declawed: + type: boolean + type: object BigCat: allOf: - $ref: '#/components/schemas/Cat' - - $ref: '#/components/schemas/BigCat_allOf' + - properties: + kind: + enum: + - lions + - tigers + - leopards + - jaguars + type: string + type: object Animal: discriminator: propertyName: className @@ -2239,29 +2253,6 @@ components: required: - requiredFile type: object - Dog_allOf: - properties: - breed: - type: string - type: object - example: null - Cat_allOf: - properties: - declawed: - type: boolean - type: object - example: null - BigCat_allOf: - properties: - kind: - enum: - - lions - - tigers - - leopards - - jaguars - type: string - type: object - example: null securitySchemes: petstore_auth: flows: diff --git a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/.openapi-generator/FILES b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/.openapi-generator/FILES index d446a086fa6..fb0e5751e4a 100644 --- a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/.openapi-generator/FILES +++ b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/.openapi-generator/FILES @@ -22,15 +22,12 @@ src/gen/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java src/gen/java/org/openapitools/model/ArrayOfNumberOnly.java src/gen/java/org/openapitools/model/ArrayTest.java src/gen/java/org/openapitools/model/BigCat.java -src/gen/java/org/openapitools/model/BigCatAllOf.java src/gen/java/org/openapitools/model/Capitalization.java src/gen/java/org/openapitools/model/Cat.java -src/gen/java/org/openapitools/model/CatAllOf.java src/gen/java/org/openapitools/model/Category.java src/gen/java/org/openapitools/model/ClassModel.java src/gen/java/org/openapitools/model/Client.java src/gen/java/org/openapitools/model/Dog.java -src/gen/java/org/openapitools/model/DogAllOf.java src/gen/java/org/openapitools/model/EnumArrays.java src/gen/java/org/openapitools/model/EnumClass.java src/gen/java/org/openapitools/model/EnumTest.java diff --git a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/BigCatAllOf.java b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/BigCatAllOf.java deleted file mode 100644 index 377f1d88de3..00000000000 --- a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/BigCatAllOf.java +++ /dev/null @@ -1,168 +0,0 @@ -package org.openapitools.model; - -import com.fasterxml.jackson.annotation.JsonTypeName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.Serializable; -import javax.validation.constraints.*; -import javax.validation.Valid; - -import io.swagger.annotations.*; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.annotation.JsonTypeName; - - - -@org.eclipse.microprofile.openapi.annotations.media.Schema(description="") -@JsonTypeName("BigCat_allOf") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") -public class BigCatAllOf implements Serializable { - public enum KindEnum { - - LIONS(String.valueOf("lions")), TIGERS(String.valueOf("tigers")), LEOPARDS(String.valueOf("leopards")), JAGUARS(String.valueOf("jaguars")); - - - private String value; - - KindEnum (String v) { - value = v; - } - - public String value() { - return value; - } - - @Override - @JsonValue - public String toString() { - return String.valueOf(value); - } - - /** - * Convert a String into String, as specified in the - * See JAX RS 2.0 Specification, section 3.2, p. 12 - */ - public static KindEnum fromString(String s) { - for (KindEnum b : KindEnum.values()) { - // using Objects.toString() to be safe if value type non-object type - // because types like 'int' etc. will be auto-boxed - if (java.util.Objects.toString(b.value).equals(s)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected string value '" + s + "'"); - } - - @JsonCreator - public static KindEnum fromValue(String value) { - for (KindEnum b : KindEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} - - private @Valid KindEnum kind; - - protected BigCatAllOf(BigCatAllOfBuilder b) { - this.kind = b.kind; - } - - public BigCatAllOf() { - } - - /** - **/ - public BigCatAllOf kind(KindEnum kind) { - this.kind = kind; - return this; - } - - - @ApiModelProperty(value = "") - @org.eclipse.microprofile.openapi.annotations.media.Schema(description = "") - @JsonProperty("kind") - public KindEnum getKind() { - return kind; - } - - @JsonProperty("kind") - public void setKind(KindEnum kind) { - this.kind = kind; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BigCatAllOf bigCatAllOf = (BigCatAllOf) o; - return Objects.equals(this.kind, bigCatAllOf.kind); - } - - @Override - public int hashCode() { - return Objects.hash(kind); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BigCatAllOf {\n"); - - sb.append(" kind: ").append(toIndentedString(kind)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static BigCatAllOfBuilder builder() { - return new BigCatAllOfBuilderImpl(); - } - - private static final class BigCatAllOfBuilderImpl extends BigCatAllOfBuilder { - - @Override - protected BigCatAllOfBuilderImpl self() { - return this; - } - - @Override - public BigCatAllOf build() { - return new BigCatAllOf(this); - } - } - - public static abstract class BigCatAllOfBuilder> { - private KindEnum kind; - protected abstract B self(); - - public abstract C build(); - - public B kind(KindEnum kind) { - this.kind = kind; - return self(); - } - } -} - diff --git a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/CatAllOf.java deleted file mode 100644 index 4676bb419f9..00000000000 --- a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/CatAllOf.java +++ /dev/null @@ -1,121 +0,0 @@ -package org.openapitools.model; - -import com.fasterxml.jackson.annotation.JsonTypeName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.Serializable; -import javax.validation.constraints.*; -import javax.validation.Valid; - -import io.swagger.annotations.*; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.annotation.JsonTypeName; - - - -@org.eclipse.microprofile.openapi.annotations.media.Schema(description="") -@JsonTypeName("Cat_allOf") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") -public class CatAllOf implements Serializable { - private @Valid Boolean declawed; - - protected CatAllOf(CatAllOfBuilder b) { - this.declawed = b.declawed; - } - - public CatAllOf() { - } - - /** - **/ - public CatAllOf declawed(Boolean declawed) { - this.declawed = declawed; - return this; - } - - - @ApiModelProperty(value = "") - @org.eclipse.microprofile.openapi.annotations.media.Schema(description = "") - @JsonProperty("declawed") - public Boolean getDeclawed() { - return declawed; - } - - @JsonProperty("declawed") - public void setDeclawed(Boolean declawed) { - this.declawed = declawed; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CatAllOf catAllOf = (CatAllOf) o; - return Objects.equals(this.declawed, catAllOf.declawed); - } - - @Override - public int hashCode() { - return Objects.hash(declawed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CatAllOf {\n"); - - sb.append(" declawed: ").append(toIndentedString(declawed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static CatAllOfBuilder builder() { - return new CatAllOfBuilderImpl(); - } - - private static final class CatAllOfBuilderImpl extends CatAllOfBuilder { - - @Override - protected CatAllOfBuilderImpl self() { - return this; - } - - @Override - public CatAllOf build() { - return new CatAllOf(this); - } - } - - public static abstract class CatAllOfBuilder> { - private Boolean declawed; - protected abstract B self(); - - public abstract C build(); - - public B declawed(Boolean declawed) { - this.declawed = declawed; - return self(); - } - } -} - diff --git a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/DogAllOf.java b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/DogAllOf.java deleted file mode 100644 index 7df1a881768..00000000000 --- a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/model/DogAllOf.java +++ /dev/null @@ -1,121 +0,0 @@ -package org.openapitools.model; - -import com.fasterxml.jackson.annotation.JsonTypeName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.Serializable; -import javax.validation.constraints.*; -import javax.validation.Valid; - -import io.swagger.annotations.*; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.annotation.JsonTypeName; - - - -@org.eclipse.microprofile.openapi.annotations.media.Schema(description="") -@JsonTypeName("Dog_allOf") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") -public class DogAllOf implements Serializable { - private @Valid String breed; - - protected DogAllOf(DogAllOfBuilder b) { - this.breed = b.breed; - } - - public DogAllOf() { - } - - /** - **/ - public DogAllOf breed(String breed) { - this.breed = breed; - return this; - } - - - @ApiModelProperty(value = "") - @org.eclipse.microprofile.openapi.annotations.media.Schema(description = "") - @JsonProperty("breed") - public String getBreed() { - return breed; - } - - @JsonProperty("breed") - public void setBreed(String breed) { - this.breed = breed; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DogAllOf dogAllOf = (DogAllOf) o; - return Objects.equals(this.breed, dogAllOf.breed); - } - - @Override - public int hashCode() { - return Objects.hash(breed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DogAllOf {\n"); - - sb.append(" breed: ").append(toIndentedString(breed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static DogAllOfBuilder builder() { - return new DogAllOfBuilderImpl(); - } - - private static final class DogAllOfBuilderImpl extends DogAllOfBuilder { - - @Override - protected DogAllOfBuilderImpl self() { - return this; - } - - @Override - public DogAllOf build() { - return new DogAllOf(this); - } - } - - public static abstract class DogAllOfBuilder> { - private String breed; - protected abstract B self(); - - public abstract C build(); - - public B breed(String breed) { - this.breed = breed; - return self(); - } - } -} - diff --git a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/main/openapi/openapi.yaml b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/main/openapi/openapi.yaml index 658d8a96b30..eded577e74f 100644 --- a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/main/openapi/openapi.yaml +++ b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/main/openapi/openapi.yaml @@ -1438,15 +1438,29 @@ components: Dog: allOf: - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Dog_allOf' + - properties: + breed: + type: string + type: object Cat: allOf: - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Cat_allOf' + - properties: + declawed: + type: boolean + type: object BigCat: allOf: - $ref: '#/components/schemas/Cat' - - $ref: '#/components/schemas/BigCat_allOf' + - properties: + kind: + enum: + - lions + - tigers + - leopards + - jaguars + type: string + type: object Animal: discriminator: propertyName: className @@ -2239,29 +2253,6 @@ components: required: - requiredFile type: object - Dog_allOf: - properties: - breed: - type: string - type: object - example: null - Cat_allOf: - properties: - declawed: - type: boolean - type: object - example: null - BigCat_allOf: - properties: - kind: - enum: - - lions - - tigers - - leopards - - jaguars - type: string - type: object - example: null securitySchemes: petstore_auth: flows: diff --git a/samples/server/petstore/jaxrs-spec/.openapi-generator/FILES b/samples/server/petstore/jaxrs-spec/.openapi-generator/FILES index cf689a825e5..3ed6ff4d23c 100644 --- a/samples/server/petstore/jaxrs-spec/.openapi-generator/FILES +++ b/samples/server/petstore/jaxrs-spec/.openapi-generator/FILES @@ -21,15 +21,12 @@ src/gen/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java src/gen/java/org/openapitools/model/ArrayOfNumberOnly.java src/gen/java/org/openapitools/model/ArrayTest.java src/gen/java/org/openapitools/model/BigCat.java -src/gen/java/org/openapitools/model/BigCatAllOf.java src/gen/java/org/openapitools/model/Capitalization.java src/gen/java/org/openapitools/model/Cat.java -src/gen/java/org/openapitools/model/CatAllOf.java src/gen/java/org/openapitools/model/Category.java src/gen/java/org/openapitools/model/ClassModel.java src/gen/java/org/openapitools/model/Client.java src/gen/java/org/openapitools/model/Dog.java -src/gen/java/org/openapitools/model/DogAllOf.java src/gen/java/org/openapitools/model/EnumArrays.java src/gen/java/org/openapitools/model/EnumClass.java src/gen/java/org/openapitools/model/EnumTest.java diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/BigCatAllOf.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/BigCatAllOf.java deleted file mode 100644 index 0ba47d26cf9..00000000000 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/BigCatAllOf.java +++ /dev/null @@ -1,166 +0,0 @@ -package org.openapitools.model; - -import com.fasterxml.jackson.annotation.JsonTypeName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.Serializable; -import javax.validation.constraints.*; -import javax.validation.Valid; - -import io.swagger.annotations.*; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.annotation.JsonTypeName; - - - -@JsonTypeName("BigCat_allOf") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") -public class BigCatAllOf implements Serializable { - public enum KindEnum { - - LIONS(String.valueOf("lions")), TIGERS(String.valueOf("tigers")), LEOPARDS(String.valueOf("leopards")), JAGUARS(String.valueOf("jaguars")); - - - private String value; - - KindEnum (String v) { - value = v; - } - - public String value() { - return value; - } - - @Override - @JsonValue - public String toString() { - return String.valueOf(value); - } - - /** - * Convert a String into String, as specified in the - * See JAX RS 2.0 Specification, section 3.2, p. 12 - */ - public static KindEnum fromString(String s) { - for (KindEnum b : KindEnum.values()) { - // using Objects.toString() to be safe if value type non-object type - // because types like 'int' etc. will be auto-boxed - if (java.util.Objects.toString(b.value).equals(s)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected string value '" + s + "'"); - } - - @JsonCreator - public static KindEnum fromValue(String value) { - for (KindEnum b : KindEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} - - private @Valid KindEnum kind; - - protected BigCatAllOf(BigCatAllOfBuilder b) { - this.kind = b.kind; - } - - public BigCatAllOf() { - } - - /** - **/ - public BigCatAllOf kind(KindEnum kind) { - this.kind = kind; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("kind") - public KindEnum getKind() { - return kind; - } - - @JsonProperty("kind") - public void setKind(KindEnum kind) { - this.kind = kind; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BigCatAllOf bigCatAllOf = (BigCatAllOf) o; - return Objects.equals(this.kind, bigCatAllOf.kind); - } - - @Override - public int hashCode() { - return Objects.hash(kind); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BigCatAllOf {\n"); - - sb.append(" kind: ").append(toIndentedString(kind)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static BigCatAllOfBuilder builder() { - return new BigCatAllOfBuilderImpl(); - } - - private static final class BigCatAllOfBuilderImpl extends BigCatAllOfBuilder { - - @Override - protected BigCatAllOfBuilderImpl self() { - return this; - } - - @Override - public BigCatAllOf build() { - return new BigCatAllOf(this); - } - } - - public static abstract class BigCatAllOfBuilder> { - private KindEnum kind; - protected abstract B self(); - - public abstract C build(); - - public B kind(KindEnum kind) { - this.kind = kind; - return self(); - } - } -} - diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/CatAllOf.java deleted file mode 100644 index 43aa9b39cdf..00000000000 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/CatAllOf.java +++ /dev/null @@ -1,119 +0,0 @@ -package org.openapitools.model; - -import com.fasterxml.jackson.annotation.JsonTypeName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.Serializable; -import javax.validation.constraints.*; -import javax.validation.Valid; - -import io.swagger.annotations.*; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.annotation.JsonTypeName; - - - -@JsonTypeName("Cat_allOf") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") -public class CatAllOf implements Serializable { - private @Valid Boolean declawed; - - protected CatAllOf(CatAllOfBuilder b) { - this.declawed = b.declawed; - } - - public CatAllOf() { - } - - /** - **/ - public CatAllOf declawed(Boolean declawed) { - this.declawed = declawed; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("declawed") - public Boolean getDeclawed() { - return declawed; - } - - @JsonProperty("declawed") - public void setDeclawed(Boolean declawed) { - this.declawed = declawed; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CatAllOf catAllOf = (CatAllOf) o; - return Objects.equals(this.declawed, catAllOf.declawed); - } - - @Override - public int hashCode() { - return Objects.hash(declawed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CatAllOf {\n"); - - sb.append(" declawed: ").append(toIndentedString(declawed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static CatAllOfBuilder builder() { - return new CatAllOfBuilderImpl(); - } - - private static final class CatAllOfBuilderImpl extends CatAllOfBuilder { - - @Override - protected CatAllOfBuilderImpl self() { - return this; - } - - @Override - public CatAllOf build() { - return new CatAllOf(this); - } - } - - public static abstract class CatAllOfBuilder> { - private Boolean declawed; - protected abstract B self(); - - public abstract C build(); - - public B declawed(Boolean declawed) { - this.declawed = declawed; - return self(); - } - } -} - diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/DogAllOf.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/DogAllOf.java deleted file mode 100644 index 1034af7eb26..00000000000 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/DogAllOf.java +++ /dev/null @@ -1,119 +0,0 @@ -package org.openapitools.model; - -import com.fasterxml.jackson.annotation.JsonTypeName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.Serializable; -import javax.validation.constraints.*; -import javax.validation.Valid; - -import io.swagger.annotations.*; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.annotation.JsonTypeName; - - - -@JsonTypeName("Dog_allOf") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen") -public class DogAllOf implements Serializable { - private @Valid String breed; - - protected DogAllOf(DogAllOfBuilder b) { - this.breed = b.breed; - } - - public DogAllOf() { - } - - /** - **/ - public DogAllOf breed(String breed) { - this.breed = breed; - return this; - } - - - @ApiModelProperty(value = "") - @JsonProperty("breed") - public String getBreed() { - return breed; - } - - @JsonProperty("breed") - public void setBreed(String breed) { - this.breed = breed; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DogAllOf dogAllOf = (DogAllOf) o; - return Objects.equals(this.breed, dogAllOf.breed); - } - - @Override - public int hashCode() { - return Objects.hash(breed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DogAllOf {\n"); - - sb.append(" breed: ").append(toIndentedString(breed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static DogAllOfBuilder builder() { - return new DogAllOfBuilderImpl(); - } - - private static final class DogAllOfBuilderImpl extends DogAllOfBuilder { - - @Override - protected DogAllOfBuilderImpl self() { - return this; - } - - @Override - public DogAllOf build() { - return new DogAllOf(this); - } - } - - public static abstract class DogAllOfBuilder> { - private String breed; - protected abstract B self(); - - public abstract C build(); - - public B breed(String breed) { - this.breed = breed; - return self(); - } - } -} - diff --git a/samples/server/petstore/jaxrs-spec/src/main/openapi/openapi.yaml b/samples/server/petstore/jaxrs-spec/src/main/openapi/openapi.yaml index 658d8a96b30..eded577e74f 100644 --- a/samples/server/petstore/jaxrs-spec/src/main/openapi/openapi.yaml +++ b/samples/server/petstore/jaxrs-spec/src/main/openapi/openapi.yaml @@ -1438,15 +1438,29 @@ components: Dog: allOf: - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Dog_allOf' + - properties: + breed: + type: string + type: object Cat: allOf: - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Cat_allOf' + - properties: + declawed: + type: boolean + type: object BigCat: allOf: - $ref: '#/components/schemas/Cat' - - $ref: '#/components/schemas/BigCat_allOf' + - properties: + kind: + enum: + - lions + - tigers + - leopards + - jaguars + type: string + type: object Animal: discriminator: propertyName: className @@ -2239,29 +2253,6 @@ components: required: - requiredFile type: object - Dog_allOf: - properties: - breed: - type: string - type: object - example: null - Cat_allOf: - properties: - declawed: - type: boolean - type: object - example: null - BigCat_allOf: - properties: - kind: - enum: - - lions - - tigers - - leopards - - jaguars - type: string - type: object - example: null securitySchemes: petstore_auth: flows: diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/.openapi-generator/FILES b/samples/server/petstore/jaxrs/jersey1-useTags/.openapi-generator/FILES index 450c68839f7..cd2eb672022 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/.openapi-generator/FILES +++ b/samples/server/petstore/jaxrs/jersey1-useTags/.openapi-generator/FILES @@ -32,15 +32,12 @@ src/gen/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java src/gen/java/org/openapitools/model/ArrayOfNumberOnly.java src/gen/java/org/openapitools/model/ArrayTest.java src/gen/java/org/openapitools/model/BigCat.java -src/gen/java/org/openapitools/model/BigCatAllOf.java src/gen/java/org/openapitools/model/Capitalization.java src/gen/java/org/openapitools/model/Cat.java -src/gen/java/org/openapitools/model/CatAllOf.java src/gen/java/org/openapitools/model/Category.java src/gen/java/org/openapitools/model/ClassModel.java src/gen/java/org/openapitools/model/Client.java src/gen/java/org/openapitools/model/Dog.java -src/gen/java/org/openapitools/model/DogAllOf.java src/gen/java/org/openapitools/model/EnumArrays.java src/gen/java/org/openapitools/model/EnumClass.java src/gen/java/org/openapitools/model/EnumTest.java diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/model/BigCatAllOf.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/model/BigCatAllOf.java deleted file mode 100644 index 73d506f60ed..00000000000 --- a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/model/BigCatAllOf.java +++ /dev/null @@ -1,133 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import javax.validation.constraints.*; -import javax.validation.Valid; - -/** - * BigCatAllOf - */ -@JsonPropertyOrder({ - BigCatAllOf.JSON_PROPERTY_KIND -}) -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen") -public class BigCatAllOf { - /** - * Gets or Sets kind - */ - public enum KindEnum { - LIONS("lions"), - - TIGERS("tigers"), - - LEOPARDS("leopards"), - - JAGUARS("jaguars"); - - private String value; - - KindEnum(String value) { - this.value = value; - } - - @Override - @JsonValue - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static KindEnum fromValue(String value) { - for (KindEnum b : KindEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - public static final String JSON_PROPERTY_KIND = "kind"; - @JsonProperty(JSON_PROPERTY_KIND) - private KindEnum kind; - - public BigCatAllOf kind(KindEnum kind) { - this.kind = kind; - return this; - } - - /** - * Get kind - * @return kind - **/ - @JsonProperty(value = "kind") - @ApiModelProperty(value = "") - - public KindEnum getKind() { - return kind; - } - - public void setKind(KindEnum kind) { - this.kind = kind; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BigCatAllOf bigCatAllOf = (BigCatAllOf) o; - return Objects.equals(this.kind, bigCatAllOf.kind); - } - - @Override - public int hashCode() { - return Objects.hash(kind); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BigCatAllOf {\n"); - - sb.append(" kind: ").append(toIndentedString(kind)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/model/CatAllOf.java deleted file mode 100644 index 92db279ac2d..00000000000 --- a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/model/CatAllOf.java +++ /dev/null @@ -1,97 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.JsonTypeName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import javax.validation.constraints.*; -import javax.validation.Valid; - -/** - * CatAllOf - */ -@JsonPropertyOrder({ - CatAllOf.JSON_PROPERTY_DECLAWED -}) -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen") -public class CatAllOf { - public static final String JSON_PROPERTY_DECLAWED = "declawed"; - @JsonProperty(JSON_PROPERTY_DECLAWED) - private Boolean declawed; - - public CatAllOf declawed(Boolean declawed) { - this.declawed = declawed; - return this; - } - - /** - * Get declawed - * @return declawed - **/ - @JsonProperty(value = "declawed") - @ApiModelProperty(value = "") - - public Boolean getDeclawed() { - return declawed; - } - - public void setDeclawed(Boolean declawed) { - this.declawed = declawed; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CatAllOf catAllOf = (CatAllOf) o; - return Objects.equals(this.declawed, catAllOf.declawed); - } - - @Override - public int hashCode() { - return Objects.hash(declawed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CatAllOf {\n"); - - sb.append(" declawed: ").append(toIndentedString(declawed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/model/DogAllOf.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/model/DogAllOf.java deleted file mode 100644 index 597a9cc1345..00000000000 --- a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/model/DogAllOf.java +++ /dev/null @@ -1,97 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.JsonTypeName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import javax.validation.constraints.*; -import javax.validation.Valid; - -/** - * DogAllOf - */ -@JsonPropertyOrder({ - DogAllOf.JSON_PROPERTY_BREED -}) -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen") -public class DogAllOf { - public static final String JSON_PROPERTY_BREED = "breed"; - @JsonProperty(JSON_PROPERTY_BREED) - private String breed; - - public DogAllOf breed(String breed) { - this.breed = breed; - return this; - } - - /** - * Get breed - * @return breed - **/ - @JsonProperty(value = "breed") - @ApiModelProperty(value = "") - - public String getBreed() { - return breed; - } - - public void setBreed(String breed) { - this.breed = breed; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DogAllOf dogAllOf = (DogAllOf) o; - return Objects.equals(this.breed, dogAllOf.breed); - } - - @Override - public int hashCode() { - return Objects.hash(breed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DogAllOf {\n"); - - sb.append(" breed: ").append(toIndentedString(breed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/jaxrs/jersey1/.openapi-generator/FILES b/samples/server/petstore/jaxrs/jersey1/.openapi-generator/FILES index f441c1926f8..0856d058b99 100644 --- a/samples/server/petstore/jaxrs/jersey1/.openapi-generator/FILES +++ b/samples/server/petstore/jaxrs/jersey1/.openapi-generator/FILES @@ -32,15 +32,12 @@ src/gen/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java src/gen/java/org/openapitools/model/ArrayOfNumberOnly.java src/gen/java/org/openapitools/model/ArrayTest.java src/gen/java/org/openapitools/model/BigCat.java -src/gen/java/org/openapitools/model/BigCatAllOf.java src/gen/java/org/openapitools/model/Capitalization.java src/gen/java/org/openapitools/model/Cat.java -src/gen/java/org/openapitools/model/CatAllOf.java src/gen/java/org/openapitools/model/Category.java src/gen/java/org/openapitools/model/ClassModel.java src/gen/java/org/openapitools/model/Client.java src/gen/java/org/openapitools/model/Dog.java -src/gen/java/org/openapitools/model/DogAllOf.java src/gen/java/org/openapitools/model/EnumArrays.java src/gen/java/org/openapitools/model/EnumClass.java src/gen/java/org/openapitools/model/EnumTest.java diff --git a/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/model/BigCatAllOf.java b/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/model/BigCatAllOf.java deleted file mode 100644 index 73d506f60ed..00000000000 --- a/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/model/BigCatAllOf.java +++ /dev/null @@ -1,133 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import javax.validation.constraints.*; -import javax.validation.Valid; - -/** - * BigCatAllOf - */ -@JsonPropertyOrder({ - BigCatAllOf.JSON_PROPERTY_KIND -}) -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen") -public class BigCatAllOf { - /** - * Gets or Sets kind - */ - public enum KindEnum { - LIONS("lions"), - - TIGERS("tigers"), - - LEOPARDS("leopards"), - - JAGUARS("jaguars"); - - private String value; - - KindEnum(String value) { - this.value = value; - } - - @Override - @JsonValue - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static KindEnum fromValue(String value) { - for (KindEnum b : KindEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - public static final String JSON_PROPERTY_KIND = "kind"; - @JsonProperty(JSON_PROPERTY_KIND) - private KindEnum kind; - - public BigCatAllOf kind(KindEnum kind) { - this.kind = kind; - return this; - } - - /** - * Get kind - * @return kind - **/ - @JsonProperty(value = "kind") - @ApiModelProperty(value = "") - - public KindEnum getKind() { - return kind; - } - - public void setKind(KindEnum kind) { - this.kind = kind; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BigCatAllOf bigCatAllOf = (BigCatAllOf) o; - return Objects.equals(this.kind, bigCatAllOf.kind); - } - - @Override - public int hashCode() { - return Objects.hash(kind); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BigCatAllOf {\n"); - - sb.append(" kind: ").append(toIndentedString(kind)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/model/CatAllOf.java deleted file mode 100644 index 92db279ac2d..00000000000 --- a/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/model/CatAllOf.java +++ /dev/null @@ -1,97 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.JsonTypeName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import javax.validation.constraints.*; -import javax.validation.Valid; - -/** - * CatAllOf - */ -@JsonPropertyOrder({ - CatAllOf.JSON_PROPERTY_DECLAWED -}) -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen") -public class CatAllOf { - public static final String JSON_PROPERTY_DECLAWED = "declawed"; - @JsonProperty(JSON_PROPERTY_DECLAWED) - private Boolean declawed; - - public CatAllOf declawed(Boolean declawed) { - this.declawed = declawed; - return this; - } - - /** - * Get declawed - * @return declawed - **/ - @JsonProperty(value = "declawed") - @ApiModelProperty(value = "") - - public Boolean getDeclawed() { - return declawed; - } - - public void setDeclawed(Boolean declawed) { - this.declawed = declawed; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CatAllOf catAllOf = (CatAllOf) o; - return Objects.equals(this.declawed, catAllOf.declawed); - } - - @Override - public int hashCode() { - return Objects.hash(declawed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CatAllOf {\n"); - - sb.append(" declawed: ").append(toIndentedString(declawed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/model/DogAllOf.java b/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/model/DogAllOf.java deleted file mode 100644 index 597a9cc1345..00000000000 --- a/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/model/DogAllOf.java +++ /dev/null @@ -1,97 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.JsonTypeName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import javax.validation.constraints.*; -import javax.validation.Valid; - -/** - * DogAllOf - */ -@JsonPropertyOrder({ - DogAllOf.JSON_PROPERTY_BREED -}) -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen") -public class DogAllOf { - public static final String JSON_PROPERTY_BREED = "breed"; - @JsonProperty(JSON_PROPERTY_BREED) - private String breed; - - public DogAllOf breed(String breed) { - this.breed = breed; - return this; - } - - /** - * Get breed - * @return breed - **/ - @JsonProperty(value = "breed") - @ApiModelProperty(value = "") - - public String getBreed() { - return breed; - } - - public void setBreed(String breed) { - this.breed = breed; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DogAllOf dogAllOf = (DogAllOf) o; - return Objects.equals(this.breed, dogAllOf.breed); - } - - @Override - public int hashCode() { - return Objects.hash(breed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DogAllOf {\n"); - - sb.append(" breed: ").append(toIndentedString(breed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/.openapi-generator/FILES b/samples/server/petstore/jaxrs/jersey2-useTags/.openapi-generator/FILES index 450c68839f7..cd2eb672022 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/.openapi-generator/FILES +++ b/samples/server/petstore/jaxrs/jersey2-useTags/.openapi-generator/FILES @@ -32,15 +32,12 @@ src/gen/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java src/gen/java/org/openapitools/model/ArrayOfNumberOnly.java src/gen/java/org/openapitools/model/ArrayTest.java src/gen/java/org/openapitools/model/BigCat.java -src/gen/java/org/openapitools/model/BigCatAllOf.java src/gen/java/org/openapitools/model/Capitalization.java src/gen/java/org/openapitools/model/Cat.java -src/gen/java/org/openapitools/model/CatAllOf.java src/gen/java/org/openapitools/model/Category.java src/gen/java/org/openapitools/model/ClassModel.java src/gen/java/org/openapitools/model/Client.java src/gen/java/org/openapitools/model/Dog.java -src/gen/java/org/openapitools/model/DogAllOf.java src/gen/java/org/openapitools/model/EnumArrays.java src/gen/java/org/openapitools/model/EnumClass.java src/gen/java/org/openapitools/model/EnumTest.java diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/model/BigCatAllOf.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/model/BigCatAllOf.java deleted file mode 100644 index 73d506f60ed..00000000000 --- a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/model/BigCatAllOf.java +++ /dev/null @@ -1,133 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import javax.validation.constraints.*; -import javax.validation.Valid; - -/** - * BigCatAllOf - */ -@JsonPropertyOrder({ - BigCatAllOf.JSON_PROPERTY_KIND -}) -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen") -public class BigCatAllOf { - /** - * Gets or Sets kind - */ - public enum KindEnum { - LIONS("lions"), - - TIGERS("tigers"), - - LEOPARDS("leopards"), - - JAGUARS("jaguars"); - - private String value; - - KindEnum(String value) { - this.value = value; - } - - @Override - @JsonValue - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static KindEnum fromValue(String value) { - for (KindEnum b : KindEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - public static final String JSON_PROPERTY_KIND = "kind"; - @JsonProperty(JSON_PROPERTY_KIND) - private KindEnum kind; - - public BigCatAllOf kind(KindEnum kind) { - this.kind = kind; - return this; - } - - /** - * Get kind - * @return kind - **/ - @JsonProperty(value = "kind") - @ApiModelProperty(value = "") - - public KindEnum getKind() { - return kind; - } - - public void setKind(KindEnum kind) { - this.kind = kind; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BigCatAllOf bigCatAllOf = (BigCatAllOf) o; - return Objects.equals(this.kind, bigCatAllOf.kind); - } - - @Override - public int hashCode() { - return Objects.hash(kind); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BigCatAllOf {\n"); - - sb.append(" kind: ").append(toIndentedString(kind)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/model/CatAllOf.java deleted file mode 100644 index 92db279ac2d..00000000000 --- a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/model/CatAllOf.java +++ /dev/null @@ -1,97 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.JsonTypeName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import javax.validation.constraints.*; -import javax.validation.Valid; - -/** - * CatAllOf - */ -@JsonPropertyOrder({ - CatAllOf.JSON_PROPERTY_DECLAWED -}) -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen") -public class CatAllOf { - public static final String JSON_PROPERTY_DECLAWED = "declawed"; - @JsonProperty(JSON_PROPERTY_DECLAWED) - private Boolean declawed; - - public CatAllOf declawed(Boolean declawed) { - this.declawed = declawed; - return this; - } - - /** - * Get declawed - * @return declawed - **/ - @JsonProperty(value = "declawed") - @ApiModelProperty(value = "") - - public Boolean getDeclawed() { - return declawed; - } - - public void setDeclawed(Boolean declawed) { - this.declawed = declawed; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CatAllOf catAllOf = (CatAllOf) o; - return Objects.equals(this.declawed, catAllOf.declawed); - } - - @Override - public int hashCode() { - return Objects.hash(declawed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CatAllOf {\n"); - - sb.append(" declawed: ").append(toIndentedString(declawed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/model/DogAllOf.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/model/DogAllOf.java deleted file mode 100644 index 597a9cc1345..00000000000 --- a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/model/DogAllOf.java +++ /dev/null @@ -1,97 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.JsonTypeName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import javax.validation.constraints.*; -import javax.validation.Valid; - -/** - * DogAllOf - */ -@JsonPropertyOrder({ - DogAllOf.JSON_PROPERTY_BREED -}) -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen") -public class DogAllOf { - public static final String JSON_PROPERTY_BREED = "breed"; - @JsonProperty(JSON_PROPERTY_BREED) - private String breed; - - public DogAllOf breed(String breed) { - this.breed = breed; - return this; - } - - /** - * Get breed - * @return breed - **/ - @JsonProperty(value = "breed") - @ApiModelProperty(value = "") - - public String getBreed() { - return breed; - } - - public void setBreed(String breed) { - this.breed = breed; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DogAllOf dogAllOf = (DogAllOf) o; - return Objects.equals(this.breed, dogAllOf.breed); - } - - @Override - public int hashCode() { - return Objects.hash(breed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DogAllOf {\n"); - - sb.append(" breed: ").append(toIndentedString(breed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/jaxrs/jersey2/.openapi-generator/FILES b/samples/server/petstore/jaxrs/jersey2/.openapi-generator/FILES index f441c1926f8..0856d058b99 100644 --- a/samples/server/petstore/jaxrs/jersey2/.openapi-generator/FILES +++ b/samples/server/petstore/jaxrs/jersey2/.openapi-generator/FILES @@ -32,15 +32,12 @@ src/gen/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java src/gen/java/org/openapitools/model/ArrayOfNumberOnly.java src/gen/java/org/openapitools/model/ArrayTest.java src/gen/java/org/openapitools/model/BigCat.java -src/gen/java/org/openapitools/model/BigCatAllOf.java src/gen/java/org/openapitools/model/Capitalization.java src/gen/java/org/openapitools/model/Cat.java -src/gen/java/org/openapitools/model/CatAllOf.java src/gen/java/org/openapitools/model/Category.java src/gen/java/org/openapitools/model/ClassModel.java src/gen/java/org/openapitools/model/Client.java src/gen/java/org/openapitools/model/Dog.java -src/gen/java/org/openapitools/model/DogAllOf.java src/gen/java/org/openapitools/model/EnumArrays.java src/gen/java/org/openapitools/model/EnumClass.java src/gen/java/org/openapitools/model/EnumTest.java diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/model/BigCatAllOf.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/model/BigCatAllOf.java deleted file mode 100644 index 73d506f60ed..00000000000 --- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/model/BigCatAllOf.java +++ /dev/null @@ -1,133 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import javax.validation.constraints.*; -import javax.validation.Valid; - -/** - * BigCatAllOf - */ -@JsonPropertyOrder({ - BigCatAllOf.JSON_PROPERTY_KIND -}) -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen") -public class BigCatAllOf { - /** - * Gets or Sets kind - */ - public enum KindEnum { - LIONS("lions"), - - TIGERS("tigers"), - - LEOPARDS("leopards"), - - JAGUARS("jaguars"); - - private String value; - - KindEnum(String value) { - this.value = value; - } - - @Override - @JsonValue - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static KindEnum fromValue(String value) { - for (KindEnum b : KindEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - public static final String JSON_PROPERTY_KIND = "kind"; - @JsonProperty(JSON_PROPERTY_KIND) - private KindEnum kind; - - public BigCatAllOf kind(KindEnum kind) { - this.kind = kind; - return this; - } - - /** - * Get kind - * @return kind - **/ - @JsonProperty(value = "kind") - @ApiModelProperty(value = "") - - public KindEnum getKind() { - return kind; - } - - public void setKind(KindEnum kind) { - this.kind = kind; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BigCatAllOf bigCatAllOf = (BigCatAllOf) o; - return Objects.equals(this.kind, bigCatAllOf.kind); - } - - @Override - public int hashCode() { - return Objects.hash(kind); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BigCatAllOf {\n"); - - sb.append(" kind: ").append(toIndentedString(kind)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/model/CatAllOf.java deleted file mode 100644 index 92db279ac2d..00000000000 --- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/model/CatAllOf.java +++ /dev/null @@ -1,97 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.JsonTypeName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import javax.validation.constraints.*; -import javax.validation.Valid; - -/** - * CatAllOf - */ -@JsonPropertyOrder({ - CatAllOf.JSON_PROPERTY_DECLAWED -}) -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen") -public class CatAllOf { - public static final String JSON_PROPERTY_DECLAWED = "declawed"; - @JsonProperty(JSON_PROPERTY_DECLAWED) - private Boolean declawed; - - public CatAllOf declawed(Boolean declawed) { - this.declawed = declawed; - return this; - } - - /** - * Get declawed - * @return declawed - **/ - @JsonProperty(value = "declawed") - @ApiModelProperty(value = "") - - public Boolean getDeclawed() { - return declawed; - } - - public void setDeclawed(Boolean declawed) { - this.declawed = declawed; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CatAllOf catAllOf = (CatAllOf) o; - return Objects.equals(this.declawed, catAllOf.declawed); - } - - @Override - public int hashCode() { - return Objects.hash(declawed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CatAllOf {\n"); - - sb.append(" declawed: ").append(toIndentedString(declawed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/model/DogAllOf.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/model/DogAllOf.java deleted file mode 100644 index 597a9cc1345..00000000000 --- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/model/DogAllOf.java +++ /dev/null @@ -1,97 +0,0 @@ -/* - * 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: \" \\ - * - * The version of the OpenAPI document: 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.JsonTypeName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import javax.validation.constraints.*; -import javax.validation.Valid; - -/** - * DogAllOf - */ -@JsonPropertyOrder({ - DogAllOf.JSON_PROPERTY_BREED -}) -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen") -public class DogAllOf { - public static final String JSON_PROPERTY_BREED = "breed"; - @JsonProperty(JSON_PROPERTY_BREED) - private String breed; - - public DogAllOf breed(String breed) { - this.breed = breed; - return this; - } - - /** - * Get breed - * @return breed - **/ - @JsonProperty(value = "breed") - @ApiModelProperty(value = "") - - public String getBreed() { - return breed; - } - - public void setBreed(String breed) { - this.breed = breed; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DogAllOf dogAllOf = (DogAllOf) o; - return Objects.equals(this.breed, dogAllOf.breed); - } - - @Override - public int hashCode() { - return Objects.hash(breed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DogAllOf {\n"); - - sb.append(" breed: ").append(toIndentedString(breed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/php-laravel/.openapi-generator/FILES b/samples/server/petstore/php-laravel/.openapi-generator/FILES index 61235a753bc..dbd3b18a17d 100644 --- a/samples/server/petstore/php-laravel/.openapi-generator/FILES +++ b/samples/server/petstore/php-laravel/.openapi-generator/FILES @@ -31,13 +31,11 @@ lib/app/Models/ArrayOfNumberOnly.php lib/app/Models/ArrayTest.php lib/app/Models/Capitalization.php lib/app/Models/Cat.php -lib/app/Models/CatAllOf.php lib/app/Models/Category.php lib/app/Models/ClassModel.php lib/app/Models/Client.php lib/app/Models/DeprecatedObject.php lib/app/Models/Dog.php -lib/app/Models/DogAllOf.php lib/app/Models/EnumArrays.php lib/app/Models/EnumClass.php lib/app/Models/EnumTest.php diff --git a/samples/server/petstore/php-laravel/lib/app/Models/CatAllOf.php b/samples/server/petstore/php-laravel/lib/app/Models/CatAllOf.php deleted file mode 100644 index 6e02243b0d3..00000000000 --- a/samples/server/petstore/php-laravel/lib/app/Models/CatAllOf.php +++ /dev/null @@ -1,15 +0,0 @@ -, - -} - -impl CatAllOf { - #[allow(clippy::new_without_default)] - pub fn new() -> CatAllOf { - CatAllOf { - declawed: None, - } - } -} - -/// Converts the CatAllOf value to the Query Parameters representation (style=form, explode=false) -/// specified in https://swagger.io/docs/specification/serialization/ -/// Should be implemented in a serde serializer -impl std::string::ToString for CatAllOf { - fn to_string(&self) -> String { - let params: Vec> = vec![ - - self.declawed.as_ref().map(|declawed| { - vec![ - "declawed".to_string(), - declawed.to_string(), - ].join(",") - }), - - ]; - - params.into_iter().flatten().collect::>().join(",") - } -} - -/// Converts Query Parameters representation (style=form, explode=false) to a CatAllOf value -/// as specified in https://swagger.io/docs/specification/serialization/ -/// Should be implemented in a serde deserializer -impl std::str::FromStr for CatAllOf { - type Err = String; - - fn from_str(s: &str) -> std::result::Result { - /// An intermediate representation of the struct to use for parsing. - #[derive(Default)] - #[allow(dead_code)] - struct IntermediateRep { - pub declawed: Vec, - } - - let mut intermediate_rep = IntermediateRep::default(); - - // Parse into intermediate representation - let mut string_iter = s.split(','); - let mut key_result = string_iter.next(); - - while key_result.is_some() { - let val = match string_iter.next() { - Some(x) => x, - None => return std::result::Result::Err("Missing value while parsing CatAllOf".to_string()) - }; - - if let Some(key) = key_result { - #[allow(clippy::match_single_binding)] - match key { - #[allow(clippy::redundant_clone)] - "declawed" => intermediate_rep.declawed.push(::from_str(val).map_err(|x| x.to_string())?), - _ => return std::result::Result::Err("Unexpected key while parsing CatAllOf".to_string()) - } - } - - // Get the next key - key_result = string_iter.next(); - } - - // Use the intermediate representation to return the struct - std::result::Result::Ok(CatAllOf { - declawed: intermediate_rep.declawed.into_iter().next(), - }) - } -} - -// Methods for converting between header::IntoHeaderValue and hyper::header::HeaderValue - -#[cfg(any(feature = "client", feature = "server"))] -impl std::convert::TryFrom> for hyper::header::HeaderValue { - type Error = String; - - fn try_from(hdr_value: header::IntoHeaderValue) -> std::result::Result { - let hdr_value = hdr_value.to_string(); - match hyper::header::HeaderValue::from_str(&hdr_value) { - std::result::Result::Ok(value) => std::result::Result::Ok(value), - std::result::Result::Err(e) => std::result::Result::Err( - format!("Invalid header value for CatAllOf - value: {} is invalid {}", - hdr_value, e)) - } - } -} - -#[cfg(any(feature = "client", feature = "server"))] -impl std::convert::TryFrom for header::IntoHeaderValue { - type Error = String; - - fn try_from(hdr_value: hyper::header::HeaderValue) -> std::result::Result { - match hdr_value.to_str() { - std::result::Result::Ok(value) => { - match ::from_str(value) { - std::result::Result::Ok(value) => std::result::Result::Ok(header::IntoHeaderValue(value)), - std::result::Result::Err(err) => std::result::Result::Err( - format!("Unable to convert header value '{}' into CatAllOf - {}", - value, err)) - } - }, - std::result::Result::Err(e) => std::result::Result::Err( - format!("Unable to convert header: {:?} to string: {}", - hdr_value, e)) - } - } -} - - -impl CatAllOf { - /// Helper function to allow us to convert this model to an XML string. - /// Will panic if serialisation fails. - #[allow(dead_code)] - pub(crate) fn as_xml(&self) -> String { - serde_xml_rs::to_string(&self).expect("impossible to fail to serialize") - } -} - #[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)] #[cfg_attr(feature = "conversion", derive(frunk::LabelledGeneric))] #[serde(rename = "Category")] @@ -2099,138 +1967,6 @@ impl Dog { } } -#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)] -#[cfg_attr(feature = "conversion", derive(frunk::LabelledGeneric))] -pub struct DogAllOf { - #[serde(rename = "breed")] - #[serde(skip_serializing_if="Option::is_none")] - pub breed: Option, - -} - -impl DogAllOf { - #[allow(clippy::new_without_default)] - pub fn new() -> DogAllOf { - DogAllOf { - breed: None, - } - } -} - -/// Converts the DogAllOf value to the Query Parameters representation (style=form, explode=false) -/// specified in https://swagger.io/docs/specification/serialization/ -/// Should be implemented in a serde serializer -impl std::string::ToString for DogAllOf { - fn to_string(&self) -> String { - let params: Vec> = vec![ - - self.breed.as_ref().map(|breed| { - vec![ - "breed".to_string(), - breed.to_string(), - ].join(",") - }), - - ]; - - params.into_iter().flatten().collect::>().join(",") - } -} - -/// Converts Query Parameters representation (style=form, explode=false) to a DogAllOf value -/// as specified in https://swagger.io/docs/specification/serialization/ -/// Should be implemented in a serde deserializer -impl std::str::FromStr for DogAllOf { - type Err = String; - - fn from_str(s: &str) -> std::result::Result { - /// An intermediate representation of the struct to use for parsing. - #[derive(Default)] - #[allow(dead_code)] - struct IntermediateRep { - pub breed: Vec, - } - - let mut intermediate_rep = IntermediateRep::default(); - - // Parse into intermediate representation - let mut string_iter = s.split(','); - let mut key_result = string_iter.next(); - - while key_result.is_some() { - let val = match string_iter.next() { - Some(x) => x, - None => return std::result::Result::Err("Missing value while parsing DogAllOf".to_string()) - }; - - if let Some(key) = key_result { - #[allow(clippy::match_single_binding)] - match key { - #[allow(clippy::redundant_clone)] - "breed" => intermediate_rep.breed.push(::from_str(val).map_err(|x| x.to_string())?), - _ => return std::result::Result::Err("Unexpected key while parsing DogAllOf".to_string()) - } - } - - // Get the next key - key_result = string_iter.next(); - } - - // Use the intermediate representation to return the struct - std::result::Result::Ok(DogAllOf { - breed: intermediate_rep.breed.into_iter().next(), - }) - } -} - -// Methods for converting between header::IntoHeaderValue and hyper::header::HeaderValue - -#[cfg(any(feature = "client", feature = "server"))] -impl std::convert::TryFrom> for hyper::header::HeaderValue { - type Error = String; - - fn try_from(hdr_value: header::IntoHeaderValue) -> std::result::Result { - let hdr_value = hdr_value.to_string(); - match hyper::header::HeaderValue::from_str(&hdr_value) { - std::result::Result::Ok(value) => std::result::Result::Ok(value), - std::result::Result::Err(e) => std::result::Result::Err( - format!("Invalid header value for DogAllOf - value: {} is invalid {}", - hdr_value, e)) - } - } -} - -#[cfg(any(feature = "client", feature = "server"))] -impl std::convert::TryFrom for header::IntoHeaderValue { - type Error = String; - - fn try_from(hdr_value: hyper::header::HeaderValue) -> std::result::Result { - match hdr_value.to_str() { - std::result::Result::Ok(value) => { - match ::from_str(value) { - std::result::Result::Ok(value) => std::result::Result::Ok(header::IntoHeaderValue(value)), - std::result::Result::Err(err) => std::result::Result::Err( - format!("Unable to convert header value '{}' into DogAllOf - {}", - value, err)) - } - }, - std::result::Result::Err(e) => std::result::Result::Err( - format!("Unable to convert header: {:?} to string: {}", - hdr_value, e)) - } - } -} - - -impl DogAllOf { - /// Helper function to allow us to convert this model to an XML string. - /// Will panic if serialisation fails. - #[allow(dead_code)] - pub(crate) fn as_xml(&self) -> String { - serde_xml_rs::to_string(&self).expect("impossible to fail to serialize") - } -} - #[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)] #[cfg_attr(feature = "conversion", derive(frunk::LabelledGeneric))] #[serde(rename = "$special[model.name]")] diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/.openapi-generator/FILES b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/.openapi-generator/FILES index 10f1284050f..13cadadce13 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/.openapi-generator/FILES +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/.openapi-generator/FILES @@ -20,16 +20,13 @@ src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java src/main/java/org/openapitools/model/ArrayOfNumberOnly.java src/main/java/org/openapitools/model/ArrayTest.java src/main/java/org/openapitools/model/BigCat.java -src/main/java/org/openapitools/model/BigCatAllOf.java src/main/java/org/openapitools/model/Capitalization.java src/main/java/org/openapitools/model/Cat.java -src/main/java/org/openapitools/model/CatAllOf.java src/main/java/org/openapitools/model/Category.java src/main/java/org/openapitools/model/ClassModel.java src/main/java/org/openapitools/model/Client.java src/main/java/org/openapitools/model/ContainerDefaultValue.java src/main/java/org/openapitools/model/Dog.java -src/main/java/org/openapitools/model/DogAllOf.java src/main/java/org/openapitools/model/EnumArrays.java src/main/java/org/openapitools/model/EnumClass.java src/main/java/org/openapitools/model/EnumTest.java diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/BigCatAllOf.java deleted file mode 100644 index bff7b148aa2..00000000000 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/BigCatAllOf.java +++ /dev/null @@ -1,125 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; -import io.swagger.v3.oas.annotations.media.Schema; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * BigCatAllOf - */ - -@JsonTypeName("BigCat_allOf") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class BigCatAllOf { - - /** - * Gets or Sets kind - */ - public enum KindEnum { - LIONS("lions"), - - TIGERS("tigers"), - - LEOPARDS("leopards"), - - JAGUARS("jaguars"); - - private String value; - - KindEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static KindEnum fromValue(String value) { - for (KindEnum b : KindEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - private KindEnum kind; - - public BigCatAllOf kind(KindEnum kind) { - this.kind = kind; - return this; - } - - /** - * Get kind - * @return kind - */ - - @Schema(name = "kind", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("kind") - public KindEnum getKind() { - return kind; - } - - public void setKind(KindEnum kind) { - this.kind = kind; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BigCatAllOf bigCatAllOf = (BigCatAllOf) o; - return Objects.equals(this.kind, bigCatAllOf.kind); - } - - @Override - public int hashCode() { - return Objects.hash(kind); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BigCatAllOf {\n"); - sb.append(" kind: ").append(toIndentedString(kind)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/CatAllOf.java deleted file mode 100644 index 0bd8697513e..00000000000 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/CatAllOf.java +++ /dev/null @@ -1,85 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; -import io.swagger.v3.oas.annotations.media.Schema; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * CatAllOf - */ - -@JsonTypeName("Cat_allOf") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class CatAllOf { - - private Boolean declawed; - - public CatAllOf declawed(Boolean declawed) { - this.declawed = declawed; - return this; - } - - /** - * Get declawed - * @return declawed - */ - - @Schema(name = "declawed", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("declawed") - public Boolean getDeclawed() { - return declawed; - } - - public void setDeclawed(Boolean declawed) { - this.declawed = declawed; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CatAllOf catAllOf = (CatAllOf) o; - return Objects.equals(this.declawed, catAllOf.declawed); - } - - @Override - public int hashCode() { - return Objects.hash(declawed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CatAllOf {\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/DogAllOf.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/DogAllOf.java deleted file mode 100644 index 6b11905f99a..00000000000 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/DogAllOf.java +++ /dev/null @@ -1,85 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; -import io.swagger.v3.oas.annotations.media.Schema; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * DogAllOf - */ - -@JsonTypeName("Dog_allOf") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class DogAllOf { - - private String breed; - - public DogAllOf breed(String breed) { - this.breed = breed; - return this; - } - - /** - * Get breed - * @return breed - */ - - @Schema(name = "breed", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("breed") - public String getBreed() { - return breed; - } - - public void setBreed(String breed) { - this.breed = breed; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DogAllOf dogAllOf = (DogAllOf) o; - return Objects.equals(this.breed, dogAllOf.breed); - } - - @Override - public int hashCode() { - return Objects.hash(breed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DogAllOf {\n"); - sb.append(" breed: ").append(toIndentedString(breed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/.openapi-generator/FILES b/samples/server/petstore/springboot-beanvalidation-no-nullable/.openapi-generator/FILES index 946be002561..8360f1fc4d3 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/.openapi-generator/FILES +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/.openapi-generator/FILES @@ -31,16 +31,13 @@ src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java src/main/java/org/openapitools/model/ArrayOfNumberOnly.java src/main/java/org/openapitools/model/ArrayTest.java src/main/java/org/openapitools/model/BigCat.java -src/main/java/org/openapitools/model/BigCatAllOf.java src/main/java/org/openapitools/model/Capitalization.java src/main/java/org/openapitools/model/Cat.java -src/main/java/org/openapitools/model/CatAllOf.java src/main/java/org/openapitools/model/Category.java src/main/java/org/openapitools/model/ClassModel.java src/main/java/org/openapitools/model/Client.java src/main/java/org/openapitools/model/ContainerDefaultValue.java src/main/java/org/openapitools/model/Dog.java -src/main/java/org/openapitools/model/DogAllOf.java src/main/java/org/openapitools/model/EnumArrays.java src/main/java/org/openapitools/model/EnumClass.java src/main/java/org/openapitools/model/EnumTest.java diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/BigCatAllOf.java deleted file mode 100644 index dd11506a903..00000000000 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/BigCatAllOf.java +++ /dev/null @@ -1,125 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * BigCatAllOf - */ - -@JsonTypeName("BigCat_allOf") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class BigCatAllOf { - - /** - * Gets or Sets kind - */ - public enum KindEnum { - LIONS("lions"), - - TIGERS("tigers"), - - LEOPARDS("leopards"), - - JAGUARS("jaguars"); - - private String value; - - KindEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static KindEnum fromValue(String value) { - for (KindEnum b : KindEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - private KindEnum kind; - - public BigCatAllOf kind(KindEnum kind) { - this.kind = kind; - return this; - } - - /** - * Get kind - * @return kind - */ - - @ApiModelProperty(value = "") - @JsonProperty("kind") - public KindEnum getKind() { - return kind; - } - - public void setKind(KindEnum kind) { - this.kind = kind; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BigCatAllOf bigCatAllOf = (BigCatAllOf) o; - return Objects.equals(this.kind, bigCatAllOf.kind); - } - - @Override - public int hashCode() { - return Objects.hash(kind); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BigCatAllOf {\n"); - sb.append(" kind: ").append(toIndentedString(kind)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/CatAllOf.java deleted file mode 100644 index fbde7c3a8dc..00000000000 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/CatAllOf.java +++ /dev/null @@ -1,85 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * CatAllOf - */ - -@JsonTypeName("Cat_allOf") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class CatAllOf { - - private Boolean declawed; - - public CatAllOf declawed(Boolean declawed) { - this.declawed = declawed; - return this; - } - - /** - * Get declawed - * @return declawed - */ - - @ApiModelProperty(value = "") - @JsonProperty("declawed") - public Boolean getDeclawed() { - return declawed; - } - - public void setDeclawed(Boolean declawed) { - this.declawed = declawed; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CatAllOf catAllOf = (CatAllOf) o; - return Objects.equals(this.declawed, catAllOf.declawed); - } - - @Override - public int hashCode() { - return Objects.hash(declawed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CatAllOf {\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/DogAllOf.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/DogAllOf.java deleted file mode 100644 index c1ff31fcefc..00000000000 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/DogAllOf.java +++ /dev/null @@ -1,85 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * DogAllOf - */ - -@JsonTypeName("Dog_allOf") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class DogAllOf { - - private String breed; - - public DogAllOf breed(String breed) { - this.breed = breed; - return this; - } - - /** - * Get breed - * @return breed - */ - - @ApiModelProperty(value = "") - @JsonProperty("breed") - public String getBreed() { - return breed; - } - - public void setBreed(String breed) { - this.breed = breed; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DogAllOf dogAllOf = (DogAllOf) o; - return Objects.equals(this.breed, dogAllOf.breed); - } - - @Override - public int hashCode() { - return Objects.hash(breed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DogAllOf {\n"); - sb.append(" breed: ").append(toIndentedString(breed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/resources/openapi.yaml index 260abafd6ea..98f0e7e6f9d 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/resources/openapi.yaml @@ -1439,15 +1439,29 @@ components: Dog: allOf: - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Dog_allOf' + - properties: + breed: + type: string + type: object Cat: allOf: - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Cat_allOf' + - properties: + declawed: + type: boolean + type: object BigCat: allOf: - $ref: '#/components/schemas/Cat' - - $ref: '#/components/schemas/BigCat_allOf' + - properties: + kind: + enum: + - lions + - tigers + - leopards + - jaguars + type: string + type: object Animal: discriminator: propertyName: className @@ -2290,29 +2304,6 @@ components: required: - requiredFile type: object - Dog_allOf: - properties: - breed: - type: string - type: object - example: null - Cat_allOf: - properties: - declawed: - type: boolean - type: object - example: null - BigCat_allOf: - properties: - kind: - enum: - - lions - - tigers - - leopards - - jaguars - type: string - type: object - example: null securitySchemes: petstore_auth: flows: diff --git a/samples/server/petstore/springboot-beanvalidation/.openapi-generator/FILES b/samples/server/petstore/springboot-beanvalidation/.openapi-generator/FILES index d46ab21480e..cf841650425 100644 --- a/samples/server/petstore/springboot-beanvalidation/.openapi-generator/FILES +++ b/samples/server/petstore/springboot-beanvalidation/.openapi-generator/FILES @@ -31,16 +31,13 @@ src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java src/main/java/org/openapitools/model/ArrayOfNumberOnly.java src/main/java/org/openapitools/model/ArrayTest.java src/main/java/org/openapitools/model/BigCat.java -src/main/java/org/openapitools/model/BigCatAllOf.java src/main/java/org/openapitools/model/Capitalization.java src/main/java/org/openapitools/model/Cat.java -src/main/java/org/openapitools/model/CatAllOf.java src/main/java/org/openapitools/model/Category.java src/main/java/org/openapitools/model/ClassModel.java src/main/java/org/openapitools/model/Client.java src/main/java/org/openapitools/model/ContainerDefaultValue.java src/main/java/org/openapitools/model/Dog.java -src/main/java/org/openapitools/model/DogAllOf.java src/main/java/org/openapitools/model/EnumArrays.java src/main/java/org/openapitools/model/EnumClass.java src/main/java/org/openapitools/model/EnumTest.java diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/BigCatAllOf.java deleted file mode 100644 index 59ab1d8d2bf..00000000000 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/BigCatAllOf.java +++ /dev/null @@ -1,126 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * BigCatAllOf - */ - -@JsonTypeName("BigCat_allOf") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class BigCatAllOf { - - /** - * Gets or Sets kind - */ - public enum KindEnum { - LIONS("lions"), - - TIGERS("tigers"), - - LEOPARDS("leopards"), - - JAGUARS("jaguars"); - - private String value; - - KindEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static KindEnum fromValue(String value) { - for (KindEnum b : KindEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - private KindEnum kind; - - public BigCatAllOf kind(KindEnum kind) { - this.kind = kind; - return this; - } - - /** - * Get kind - * @return kind - */ - - @ApiModelProperty(value = "") - @JsonProperty("kind") - public KindEnum getKind() { - return kind; - } - - public void setKind(KindEnum kind) { - this.kind = kind; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BigCatAllOf bigCatAllOf = (BigCatAllOf) o; - return Objects.equals(this.kind, bigCatAllOf.kind); - } - - @Override - public int hashCode() { - return Objects.hash(kind); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BigCatAllOf {\n"); - sb.append(" kind: ").append(toIndentedString(kind)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/CatAllOf.java deleted file mode 100644 index 85c6885ae00..00000000000 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/CatAllOf.java +++ /dev/null @@ -1,86 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * CatAllOf - */ - -@JsonTypeName("Cat_allOf") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class CatAllOf { - - private Boolean declawed; - - public CatAllOf declawed(Boolean declawed) { - this.declawed = declawed; - return this; - } - - /** - * Get declawed - * @return declawed - */ - - @ApiModelProperty(value = "") - @JsonProperty("declawed") - public Boolean getDeclawed() { - return declawed; - } - - public void setDeclawed(Boolean declawed) { - this.declawed = declawed; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CatAllOf catAllOf = (CatAllOf) o; - return Objects.equals(this.declawed, catAllOf.declawed); - } - - @Override - public int hashCode() { - return Objects.hash(declawed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CatAllOf {\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/DogAllOf.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/DogAllOf.java deleted file mode 100644 index 5784d207b4d..00000000000 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/DogAllOf.java +++ /dev/null @@ -1,86 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * DogAllOf - */ - -@JsonTypeName("Dog_allOf") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class DogAllOf { - - private String breed; - - public DogAllOf breed(String breed) { - this.breed = breed; - return this; - } - - /** - * Get breed - * @return breed - */ - - @ApiModelProperty(value = "") - @JsonProperty("breed") - public String getBreed() { - return breed; - } - - public void setBreed(String breed) { - this.breed = breed; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DogAllOf dogAllOf = (DogAllOf) o; - return Objects.equals(this.breed, dogAllOf.breed); - } - - @Override - public int hashCode() { - return Objects.hash(breed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DogAllOf {\n"); - sb.append(" breed: ").append(toIndentedString(breed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-beanvalidation/src/main/resources/openapi.yaml index 260abafd6ea..98f0e7e6f9d 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-beanvalidation/src/main/resources/openapi.yaml @@ -1439,15 +1439,29 @@ components: Dog: allOf: - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Dog_allOf' + - properties: + breed: + type: string + type: object Cat: allOf: - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Cat_allOf' + - properties: + declawed: + type: boolean + type: object BigCat: allOf: - $ref: '#/components/schemas/Cat' - - $ref: '#/components/schemas/BigCat_allOf' + - properties: + kind: + enum: + - lions + - tigers + - leopards + - jaguars + type: string + type: object Animal: discriminator: propertyName: className @@ -2290,29 +2304,6 @@ components: required: - requiredFile type: object - Dog_allOf: - properties: - breed: - type: string - type: object - example: null - Cat_allOf: - properties: - declawed: - type: boolean - type: object - example: null - BigCat_allOf: - properties: - kind: - enum: - - lions - - tigers - - leopards - - jaguars - type: string - type: object - example: null securitySchemes: petstore_auth: flows: diff --git a/samples/server/petstore/springboot-delegate-j8/.openapi-generator/FILES b/samples/server/petstore/springboot-delegate-j8/.openapi-generator/FILES index 5789fc3c295..fea9a8ab492 100644 --- a/samples/server/petstore/springboot-delegate-j8/.openapi-generator/FILES +++ b/samples/server/petstore/springboot-delegate-j8/.openapi-generator/FILES @@ -37,16 +37,13 @@ src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java src/main/java/org/openapitools/model/ArrayOfNumberOnly.java src/main/java/org/openapitools/model/ArrayTest.java src/main/java/org/openapitools/model/BigCat.java -src/main/java/org/openapitools/model/BigCatAllOf.java src/main/java/org/openapitools/model/Capitalization.java src/main/java/org/openapitools/model/Cat.java -src/main/java/org/openapitools/model/CatAllOf.java src/main/java/org/openapitools/model/Category.java src/main/java/org/openapitools/model/ClassModel.java src/main/java/org/openapitools/model/Client.java src/main/java/org/openapitools/model/ContainerDefaultValue.java src/main/java/org/openapitools/model/Dog.java -src/main/java/org/openapitools/model/DogAllOf.java src/main/java/org/openapitools/model/EnumArrays.java src/main/java/org/openapitools/model/EnumClass.java src/main/java/org/openapitools/model/EnumTest.java diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/BigCatAllOf.java deleted file mode 100644 index 59ab1d8d2bf..00000000000 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/BigCatAllOf.java +++ /dev/null @@ -1,126 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * BigCatAllOf - */ - -@JsonTypeName("BigCat_allOf") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class BigCatAllOf { - - /** - * Gets or Sets kind - */ - public enum KindEnum { - LIONS("lions"), - - TIGERS("tigers"), - - LEOPARDS("leopards"), - - JAGUARS("jaguars"); - - private String value; - - KindEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static KindEnum fromValue(String value) { - for (KindEnum b : KindEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - private KindEnum kind; - - public BigCatAllOf kind(KindEnum kind) { - this.kind = kind; - return this; - } - - /** - * Get kind - * @return kind - */ - - @ApiModelProperty(value = "") - @JsonProperty("kind") - public KindEnum getKind() { - return kind; - } - - public void setKind(KindEnum kind) { - this.kind = kind; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BigCatAllOf bigCatAllOf = (BigCatAllOf) o; - return Objects.equals(this.kind, bigCatAllOf.kind); - } - - @Override - public int hashCode() { - return Objects.hash(kind); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BigCatAllOf {\n"); - sb.append(" kind: ").append(toIndentedString(kind)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/CatAllOf.java deleted file mode 100644 index 85c6885ae00..00000000000 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/CatAllOf.java +++ /dev/null @@ -1,86 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * CatAllOf - */ - -@JsonTypeName("Cat_allOf") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class CatAllOf { - - private Boolean declawed; - - public CatAllOf declawed(Boolean declawed) { - this.declawed = declawed; - return this; - } - - /** - * Get declawed - * @return declawed - */ - - @ApiModelProperty(value = "") - @JsonProperty("declawed") - public Boolean getDeclawed() { - return declawed; - } - - public void setDeclawed(Boolean declawed) { - this.declawed = declawed; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CatAllOf catAllOf = (CatAllOf) o; - return Objects.equals(this.declawed, catAllOf.declawed); - } - - @Override - public int hashCode() { - return Objects.hash(declawed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CatAllOf {\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/DogAllOf.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/DogAllOf.java deleted file mode 100644 index 5784d207b4d..00000000000 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/DogAllOf.java +++ /dev/null @@ -1,86 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * DogAllOf - */ - -@JsonTypeName("Dog_allOf") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class DogAllOf { - - private String breed; - - public DogAllOf breed(String breed) { - this.breed = breed; - return this; - } - - /** - * Get breed - * @return breed - */ - - @ApiModelProperty(value = "") - @JsonProperty("breed") - public String getBreed() { - return breed; - } - - public void setBreed(String breed) { - this.breed = breed; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DogAllOf dogAllOf = (DogAllOf) o; - return Objects.equals(this.breed, dogAllOf.breed); - } - - @Override - public int hashCode() { - return Objects.hash(breed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DogAllOf {\n"); - sb.append(" breed: ").append(toIndentedString(breed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-delegate-j8/src/main/resources/openapi.yaml index 260abafd6ea..98f0e7e6f9d 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-delegate-j8/src/main/resources/openapi.yaml @@ -1439,15 +1439,29 @@ components: Dog: allOf: - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Dog_allOf' + - properties: + breed: + type: string + type: object Cat: allOf: - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Cat_allOf' + - properties: + declawed: + type: boolean + type: object BigCat: allOf: - $ref: '#/components/schemas/Cat' - - $ref: '#/components/schemas/BigCat_allOf' + - properties: + kind: + enum: + - lions + - tigers + - leopards + - jaguars + type: string + type: object Animal: discriminator: propertyName: className @@ -2290,29 +2304,6 @@ components: required: - requiredFile type: object - Dog_allOf: - properties: - breed: - type: string - type: object - example: null - Cat_allOf: - properties: - declawed: - type: boolean - type: object - example: null - BigCat_allOf: - properties: - kind: - enum: - - lions - - tigers - - leopards - - jaguars - type: string - type: object - example: null securitySchemes: petstore_auth: flows: diff --git a/samples/server/petstore/springboot-delegate/.openapi-generator/FILES b/samples/server/petstore/springboot-delegate/.openapi-generator/FILES index 5789fc3c295..fea9a8ab492 100644 --- a/samples/server/petstore/springboot-delegate/.openapi-generator/FILES +++ b/samples/server/petstore/springboot-delegate/.openapi-generator/FILES @@ -37,16 +37,13 @@ src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java src/main/java/org/openapitools/model/ArrayOfNumberOnly.java src/main/java/org/openapitools/model/ArrayTest.java src/main/java/org/openapitools/model/BigCat.java -src/main/java/org/openapitools/model/BigCatAllOf.java src/main/java/org/openapitools/model/Capitalization.java src/main/java/org/openapitools/model/Cat.java -src/main/java/org/openapitools/model/CatAllOf.java src/main/java/org/openapitools/model/Category.java src/main/java/org/openapitools/model/ClassModel.java src/main/java/org/openapitools/model/Client.java src/main/java/org/openapitools/model/ContainerDefaultValue.java src/main/java/org/openapitools/model/Dog.java -src/main/java/org/openapitools/model/DogAllOf.java src/main/java/org/openapitools/model/EnumArrays.java src/main/java/org/openapitools/model/EnumClass.java src/main/java/org/openapitools/model/EnumTest.java diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCatAllOf.java deleted file mode 100644 index 59ab1d8d2bf..00000000000 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCatAllOf.java +++ /dev/null @@ -1,126 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * BigCatAllOf - */ - -@JsonTypeName("BigCat_allOf") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class BigCatAllOf { - - /** - * Gets or Sets kind - */ - public enum KindEnum { - LIONS("lions"), - - TIGERS("tigers"), - - LEOPARDS("leopards"), - - JAGUARS("jaguars"); - - private String value; - - KindEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static KindEnum fromValue(String value) { - for (KindEnum b : KindEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - private KindEnum kind; - - public BigCatAllOf kind(KindEnum kind) { - this.kind = kind; - return this; - } - - /** - * Get kind - * @return kind - */ - - @ApiModelProperty(value = "") - @JsonProperty("kind") - public KindEnum getKind() { - return kind; - } - - public void setKind(KindEnum kind) { - this.kind = kind; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BigCatAllOf bigCatAllOf = (BigCatAllOf) o; - return Objects.equals(this.kind, bigCatAllOf.kind); - } - - @Override - public int hashCode() { - return Objects.hash(kind); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BigCatAllOf {\n"); - sb.append(" kind: ").append(toIndentedString(kind)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/CatAllOf.java deleted file mode 100644 index 85c6885ae00..00000000000 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/CatAllOf.java +++ /dev/null @@ -1,86 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * CatAllOf - */ - -@JsonTypeName("Cat_allOf") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class CatAllOf { - - private Boolean declawed; - - public CatAllOf declawed(Boolean declawed) { - this.declawed = declawed; - return this; - } - - /** - * Get declawed - * @return declawed - */ - - @ApiModelProperty(value = "") - @JsonProperty("declawed") - public Boolean getDeclawed() { - return declawed; - } - - public void setDeclawed(Boolean declawed) { - this.declawed = declawed; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CatAllOf catAllOf = (CatAllOf) o; - return Objects.equals(this.declawed, catAllOf.declawed); - } - - @Override - public int hashCode() { - return Objects.hash(declawed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CatAllOf {\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/DogAllOf.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/DogAllOf.java deleted file mode 100644 index 5784d207b4d..00000000000 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/DogAllOf.java +++ /dev/null @@ -1,86 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * DogAllOf - */ - -@JsonTypeName("Dog_allOf") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class DogAllOf { - - private String breed; - - public DogAllOf breed(String breed) { - this.breed = breed; - return this; - } - - /** - * Get breed - * @return breed - */ - - @ApiModelProperty(value = "") - @JsonProperty("breed") - public String getBreed() { - return breed; - } - - public void setBreed(String breed) { - this.breed = breed; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DogAllOf dogAllOf = (DogAllOf) o; - return Objects.equals(this.breed, dogAllOf.breed); - } - - @Override - public int hashCode() { - return Objects.hash(breed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DogAllOf {\n"); - sb.append(" breed: ").append(toIndentedString(breed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/springboot-delegate/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-delegate/src/main/resources/openapi.yaml index 260abafd6ea..98f0e7e6f9d 100644 --- a/samples/server/petstore/springboot-delegate/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-delegate/src/main/resources/openapi.yaml @@ -1439,15 +1439,29 @@ components: Dog: allOf: - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Dog_allOf' + - properties: + breed: + type: string + type: object Cat: allOf: - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Cat_allOf' + - properties: + declawed: + type: boolean + type: object BigCat: allOf: - $ref: '#/components/schemas/Cat' - - $ref: '#/components/schemas/BigCat_allOf' + - properties: + kind: + enum: + - lions + - tigers + - leopards + - jaguars + type: string + type: object Animal: discriminator: propertyName: className @@ -2290,29 +2304,6 @@ components: required: - requiredFile type: object - Dog_allOf: - properties: - breed: - type: string - type: object - example: null - Cat_allOf: - properties: - declawed: - type: boolean - type: object - example: null - BigCat_allOf: - properties: - kind: - enum: - - lions - - tigers - - leopards - - jaguars - type: string - type: object - example: null securitySchemes: petstore_auth: flows: diff --git a/samples/server/petstore/springboot-implicitHeaders/.openapi-generator/FILES b/samples/server/petstore/springboot-implicitHeaders/.openapi-generator/FILES index 946be002561..8360f1fc4d3 100644 --- a/samples/server/petstore/springboot-implicitHeaders/.openapi-generator/FILES +++ b/samples/server/petstore/springboot-implicitHeaders/.openapi-generator/FILES @@ -31,16 +31,13 @@ src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java src/main/java/org/openapitools/model/ArrayOfNumberOnly.java src/main/java/org/openapitools/model/ArrayTest.java src/main/java/org/openapitools/model/BigCat.java -src/main/java/org/openapitools/model/BigCatAllOf.java src/main/java/org/openapitools/model/Capitalization.java src/main/java/org/openapitools/model/Cat.java -src/main/java/org/openapitools/model/CatAllOf.java src/main/java/org/openapitools/model/Category.java src/main/java/org/openapitools/model/ClassModel.java src/main/java/org/openapitools/model/Client.java src/main/java/org/openapitools/model/ContainerDefaultValue.java src/main/java/org/openapitools/model/Dog.java -src/main/java/org/openapitools/model/DogAllOf.java src/main/java/org/openapitools/model/EnumArrays.java src/main/java/org/openapitools/model/EnumClass.java src/main/java/org/openapitools/model/EnumTest.java diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/BigCatAllOf.java deleted file mode 100644 index 59ab1d8d2bf..00000000000 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/BigCatAllOf.java +++ /dev/null @@ -1,126 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * BigCatAllOf - */ - -@JsonTypeName("BigCat_allOf") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class BigCatAllOf { - - /** - * Gets or Sets kind - */ - public enum KindEnum { - LIONS("lions"), - - TIGERS("tigers"), - - LEOPARDS("leopards"), - - JAGUARS("jaguars"); - - private String value; - - KindEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static KindEnum fromValue(String value) { - for (KindEnum b : KindEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - private KindEnum kind; - - public BigCatAllOf kind(KindEnum kind) { - this.kind = kind; - return this; - } - - /** - * Get kind - * @return kind - */ - - @ApiModelProperty(value = "") - @JsonProperty("kind") - public KindEnum getKind() { - return kind; - } - - public void setKind(KindEnum kind) { - this.kind = kind; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BigCatAllOf bigCatAllOf = (BigCatAllOf) o; - return Objects.equals(this.kind, bigCatAllOf.kind); - } - - @Override - public int hashCode() { - return Objects.hash(kind); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BigCatAllOf {\n"); - sb.append(" kind: ").append(toIndentedString(kind)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/CatAllOf.java deleted file mode 100644 index 85c6885ae00..00000000000 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/CatAllOf.java +++ /dev/null @@ -1,86 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * CatAllOf - */ - -@JsonTypeName("Cat_allOf") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class CatAllOf { - - private Boolean declawed; - - public CatAllOf declawed(Boolean declawed) { - this.declawed = declawed; - return this; - } - - /** - * Get declawed - * @return declawed - */ - - @ApiModelProperty(value = "") - @JsonProperty("declawed") - public Boolean getDeclawed() { - return declawed; - } - - public void setDeclawed(Boolean declawed) { - this.declawed = declawed; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CatAllOf catAllOf = (CatAllOf) o; - return Objects.equals(this.declawed, catAllOf.declawed); - } - - @Override - public int hashCode() { - return Objects.hash(declawed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CatAllOf {\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/DogAllOf.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/DogAllOf.java deleted file mode 100644 index 5784d207b4d..00000000000 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/DogAllOf.java +++ /dev/null @@ -1,86 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * DogAllOf - */ - -@JsonTypeName("Dog_allOf") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class DogAllOf { - - private String breed; - - public DogAllOf breed(String breed) { - this.breed = breed; - return this; - } - - /** - * Get breed - * @return breed - */ - - @ApiModelProperty(value = "") - @JsonProperty("breed") - public String getBreed() { - return breed; - } - - public void setBreed(String breed) { - this.breed = breed; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DogAllOf dogAllOf = (DogAllOf) o; - return Objects.equals(this.breed, dogAllOf.breed); - } - - @Override - public int hashCode() { - return Objects.hash(breed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DogAllOf {\n"); - sb.append(" breed: ").append(toIndentedString(breed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-implicitHeaders/src/main/resources/openapi.yaml index 260abafd6ea..98f0e7e6f9d 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/resources/openapi.yaml @@ -1439,15 +1439,29 @@ components: Dog: allOf: - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Dog_allOf' + - properties: + breed: + type: string + type: object Cat: allOf: - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Cat_allOf' + - properties: + declawed: + type: boolean + type: object BigCat: allOf: - $ref: '#/components/schemas/Cat' - - $ref: '#/components/schemas/BigCat_allOf' + - properties: + kind: + enum: + - lions + - tigers + - leopards + - jaguars + type: string + type: object Animal: discriminator: propertyName: className @@ -2290,29 +2304,6 @@ components: required: - requiredFile type: object - Dog_allOf: - properties: - breed: - type: string - type: object - example: null - Cat_allOf: - properties: - declawed: - type: boolean - type: object - example: null - BigCat_allOf: - properties: - kind: - enum: - - lions - - tigers - - leopards - - jaguars - type: string - type: object - example: null securitySchemes: petstore_auth: flows: diff --git a/samples/server/petstore/springboot-reactive/.openapi-generator/FILES b/samples/server/petstore/springboot-reactive/.openapi-generator/FILES index d91ebbece08..6e18cfc7874 100644 --- a/samples/server/petstore/springboot-reactive/.openapi-generator/FILES +++ b/samples/server/petstore/springboot-reactive/.openapi-generator/FILES @@ -36,16 +36,13 @@ src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java src/main/java/org/openapitools/model/ArrayOfNumberOnly.java src/main/java/org/openapitools/model/ArrayTest.java src/main/java/org/openapitools/model/BigCat.java -src/main/java/org/openapitools/model/BigCatAllOf.java src/main/java/org/openapitools/model/Capitalization.java src/main/java/org/openapitools/model/Cat.java -src/main/java/org/openapitools/model/CatAllOf.java src/main/java/org/openapitools/model/Category.java src/main/java/org/openapitools/model/ClassModel.java src/main/java/org/openapitools/model/Client.java src/main/java/org/openapitools/model/ContainerDefaultValue.java src/main/java/org/openapitools/model/Dog.java -src/main/java/org/openapitools/model/DogAllOf.java src/main/java/org/openapitools/model/EnumArrays.java src/main/java/org/openapitools/model/EnumClass.java src/main/java/org/openapitools/model/EnumTest.java diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/BigCatAllOf.java deleted file mode 100644 index 59ab1d8d2bf..00000000000 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/BigCatAllOf.java +++ /dev/null @@ -1,126 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * BigCatAllOf - */ - -@JsonTypeName("BigCat_allOf") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class BigCatAllOf { - - /** - * Gets or Sets kind - */ - public enum KindEnum { - LIONS("lions"), - - TIGERS("tigers"), - - LEOPARDS("leopards"), - - JAGUARS("jaguars"); - - private String value; - - KindEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static KindEnum fromValue(String value) { - for (KindEnum b : KindEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - private KindEnum kind; - - public BigCatAllOf kind(KindEnum kind) { - this.kind = kind; - return this; - } - - /** - * Get kind - * @return kind - */ - - @ApiModelProperty(value = "") - @JsonProperty("kind") - public KindEnum getKind() { - return kind; - } - - public void setKind(KindEnum kind) { - this.kind = kind; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BigCatAllOf bigCatAllOf = (BigCatAllOf) o; - return Objects.equals(this.kind, bigCatAllOf.kind); - } - - @Override - public int hashCode() { - return Objects.hash(kind); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BigCatAllOf {\n"); - sb.append(" kind: ").append(toIndentedString(kind)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/CatAllOf.java deleted file mode 100644 index 85c6885ae00..00000000000 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/CatAllOf.java +++ /dev/null @@ -1,86 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * CatAllOf - */ - -@JsonTypeName("Cat_allOf") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class CatAllOf { - - private Boolean declawed; - - public CatAllOf declawed(Boolean declawed) { - this.declawed = declawed; - return this; - } - - /** - * Get declawed - * @return declawed - */ - - @ApiModelProperty(value = "") - @JsonProperty("declawed") - public Boolean getDeclawed() { - return declawed; - } - - public void setDeclawed(Boolean declawed) { - this.declawed = declawed; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CatAllOf catAllOf = (CatAllOf) o; - return Objects.equals(this.declawed, catAllOf.declawed); - } - - @Override - public int hashCode() { - return Objects.hash(declawed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CatAllOf {\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/DogAllOf.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/DogAllOf.java deleted file mode 100644 index 5784d207b4d..00000000000 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/DogAllOf.java +++ /dev/null @@ -1,86 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * DogAllOf - */ - -@JsonTypeName("Dog_allOf") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class DogAllOf { - - private String breed; - - public DogAllOf breed(String breed) { - this.breed = breed; - return this; - } - - /** - * Get breed - * @return breed - */ - - @ApiModelProperty(value = "") - @JsonProperty("breed") - public String getBreed() { - return breed; - } - - public void setBreed(String breed) { - this.breed = breed; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DogAllOf dogAllOf = (DogAllOf) o; - return Objects.equals(this.breed, dogAllOf.breed); - } - - @Override - public int hashCode() { - return Objects.hash(breed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DogAllOf {\n"); - sb.append(" breed: ").append(toIndentedString(breed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/springboot-reactive/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-reactive/src/main/resources/openapi.yaml index 260abafd6ea..98f0e7e6f9d 100644 --- a/samples/server/petstore/springboot-reactive/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-reactive/src/main/resources/openapi.yaml @@ -1439,15 +1439,29 @@ components: Dog: allOf: - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Dog_allOf' + - properties: + breed: + type: string + type: object Cat: allOf: - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Cat_allOf' + - properties: + declawed: + type: boolean + type: object BigCat: allOf: - $ref: '#/components/schemas/Cat' - - $ref: '#/components/schemas/BigCat_allOf' + - properties: + kind: + enum: + - lions + - tigers + - leopards + - jaguars + type: string + type: object Animal: discriminator: propertyName: className @@ -2290,29 +2304,6 @@ components: required: - requiredFile type: object - Dog_allOf: - properties: - breed: - type: string - type: object - example: null - Cat_allOf: - properties: - declawed: - type: boolean - type: object - example: null - BigCat_allOf: - properties: - kind: - enum: - - lions - - tigers - - leopards - - jaguars - type: string - type: object - example: null securitySchemes: petstore_auth: flows: diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/.openapi-generator/FILES b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/.openapi-generator/FILES index a2fd8be1c90..f41a04cca5d 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/.openapi-generator/FILES +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/.openapi-generator/FILES @@ -41,12 +41,10 @@ src/main/java/org/openapitools/model/ArrayOfNumberOnly.java src/main/java/org/openapitools/model/ArrayTest.java src/main/java/org/openapitools/model/Capitalization.java src/main/java/org/openapitools/model/Cat.java -src/main/java/org/openapitools/model/CatAllOf.java src/main/java/org/openapitools/model/Category.java src/main/java/org/openapitools/model/ClassModel.java src/main/java/org/openapitools/model/Client.java src/main/java/org/openapitools/model/Dog.java -src/main/java/org/openapitools/model/DogAllOf.java src/main/java/org/openapitools/model/EnumArrays.java src/main/java/org/openapitools/model/EnumClass.java src/main/java/org/openapitools/model/EnumTest.java diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/CatAllOf.java deleted file mode 100644 index 85c6885ae00..00000000000 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/CatAllOf.java +++ /dev/null @@ -1,86 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * CatAllOf - */ - -@JsonTypeName("Cat_allOf") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class CatAllOf { - - private Boolean declawed; - - public CatAllOf declawed(Boolean declawed) { - this.declawed = declawed; - return this; - } - - /** - * Get declawed - * @return declawed - */ - - @ApiModelProperty(value = "") - @JsonProperty("declawed") - public Boolean getDeclawed() { - return declawed; - } - - public void setDeclawed(Boolean declawed) { - this.declawed = declawed; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CatAllOf catAllOf = (CatAllOf) o; - return Objects.equals(this.declawed, catAllOf.declawed); - } - - @Override - public int hashCode() { - return Objects.hash(declawed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CatAllOf {\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/DogAllOf.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/DogAllOf.java deleted file mode 100644 index 5784d207b4d..00000000000 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/model/DogAllOf.java +++ /dev/null @@ -1,86 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * DogAllOf - */ - -@JsonTypeName("Dog_allOf") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class DogAllOf { - - private String breed; - - public DogAllOf breed(String breed) { - this.breed = breed; - return this; - } - - /** - * Get breed - * @return breed - */ - - @ApiModelProperty(value = "") - @JsonProperty("breed") - public String getBreed() { - return breed; - } - - public void setBreed(String breed) { - this.breed = breed; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DogAllOf dogAllOf = (DogAllOf) o; - return Objects.equals(this.breed, dogAllOf.breed); - } - - @Override - public int hashCode() { - return Objects.hash(breed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DogAllOf {\n"); - sb.append(" breed: ").append(toIndentedString(breed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/resources/openapi.yaml index 7a2cc752908..c07f4f9b8a8 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/resources/openapi.yaml @@ -1683,11 +1683,17 @@ components: Dog: allOf: - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Dog_allOf' + - properties: + breed: + type: string + type: object Cat: allOf: - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Cat_allOf' + - properties: + declawed: + type: boolean + type: object Animal: discriminator: propertyName: className @@ -2474,18 +2480,6 @@ components: type: string required: - requiredFile - Dog_allOf: - properties: - breed: - type: string - type: object - example: null - Cat_allOf: - properties: - declawed: - type: boolean - type: object - example: null securitySchemes: petstore_auth: flows: diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/.openapi-generator/FILES b/samples/server/petstore/springboot-spring-pageable-delegatePattern/.openapi-generator/FILES index a2fd8be1c90..f41a04cca5d 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/.openapi-generator/FILES +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/.openapi-generator/FILES @@ -41,12 +41,10 @@ src/main/java/org/openapitools/model/ArrayOfNumberOnly.java src/main/java/org/openapitools/model/ArrayTest.java src/main/java/org/openapitools/model/Capitalization.java src/main/java/org/openapitools/model/Cat.java -src/main/java/org/openapitools/model/CatAllOf.java src/main/java/org/openapitools/model/Category.java src/main/java/org/openapitools/model/ClassModel.java src/main/java/org/openapitools/model/Client.java src/main/java/org/openapitools/model/Dog.java -src/main/java/org/openapitools/model/DogAllOf.java src/main/java/org/openapitools/model/EnumArrays.java src/main/java/org/openapitools/model/EnumClass.java src/main/java/org/openapitools/model/EnumTest.java diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/CatAllOf.java deleted file mode 100644 index 85c6885ae00..00000000000 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/CatAllOf.java +++ /dev/null @@ -1,86 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * CatAllOf - */ - -@JsonTypeName("Cat_allOf") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class CatAllOf { - - private Boolean declawed; - - public CatAllOf declawed(Boolean declawed) { - this.declawed = declawed; - return this; - } - - /** - * Get declawed - * @return declawed - */ - - @ApiModelProperty(value = "") - @JsonProperty("declawed") - public Boolean getDeclawed() { - return declawed; - } - - public void setDeclawed(Boolean declawed) { - this.declawed = declawed; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CatAllOf catAllOf = (CatAllOf) o; - return Objects.equals(this.declawed, catAllOf.declawed); - } - - @Override - public int hashCode() { - return Objects.hash(declawed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CatAllOf {\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/DogAllOf.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/DogAllOf.java deleted file mode 100644 index 5784d207b4d..00000000000 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/model/DogAllOf.java +++ /dev/null @@ -1,86 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * DogAllOf - */ - -@JsonTypeName("Dog_allOf") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class DogAllOf { - - private String breed; - - public DogAllOf breed(String breed) { - this.breed = breed; - return this; - } - - /** - * Get breed - * @return breed - */ - - @ApiModelProperty(value = "") - @JsonProperty("breed") - public String getBreed() { - return breed; - } - - public void setBreed(String breed) { - this.breed = breed; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DogAllOf dogAllOf = (DogAllOf) o; - return Objects.equals(this.breed, dogAllOf.breed); - } - - @Override - public int hashCode() { - return Objects.hash(breed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DogAllOf {\n"); - sb.append(" breed: ").append(toIndentedString(breed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/resources/openapi.yaml index 7a2cc752908..c07f4f9b8a8 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/resources/openapi.yaml @@ -1683,11 +1683,17 @@ components: Dog: allOf: - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Dog_allOf' + - properties: + breed: + type: string + type: object Cat: allOf: - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Cat_allOf' + - properties: + declawed: + type: boolean + type: object Animal: discriminator: propertyName: className @@ -2474,18 +2480,6 @@ components: type: string required: - requiredFile - Dog_allOf: - properties: - breed: - type: string - type: object - example: null - Cat_allOf: - properties: - declawed: - type: boolean - type: object - example: null securitySchemes: petstore_auth: flows: diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/.openapi-generator/FILES b/samples/server/petstore/springboot-spring-pageable-without-j8/.openapi-generator/FILES index 1fc22e59740..3eb92a4787f 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/.openapi-generator/FILES +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/.openapi-generator/FILES @@ -34,12 +34,10 @@ src/main/java/org/openapitools/model/ArrayOfNumberOnly.java src/main/java/org/openapitools/model/ArrayTest.java src/main/java/org/openapitools/model/Capitalization.java src/main/java/org/openapitools/model/Cat.java -src/main/java/org/openapitools/model/CatAllOf.java src/main/java/org/openapitools/model/Category.java src/main/java/org/openapitools/model/ClassModel.java src/main/java/org/openapitools/model/Client.java src/main/java/org/openapitools/model/Dog.java -src/main/java/org/openapitools/model/DogAllOf.java src/main/java/org/openapitools/model/EnumArrays.java src/main/java/org/openapitools/model/EnumClass.java src/main/java/org/openapitools/model/EnumTest.java diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/CatAllOf.java deleted file mode 100644 index 85c6885ae00..00000000000 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/CatAllOf.java +++ /dev/null @@ -1,86 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * CatAllOf - */ - -@JsonTypeName("Cat_allOf") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class CatAllOf { - - private Boolean declawed; - - public CatAllOf declawed(Boolean declawed) { - this.declawed = declawed; - return this; - } - - /** - * Get declawed - * @return declawed - */ - - @ApiModelProperty(value = "") - @JsonProperty("declawed") - public Boolean getDeclawed() { - return declawed; - } - - public void setDeclawed(Boolean declawed) { - this.declawed = declawed; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CatAllOf catAllOf = (CatAllOf) o; - return Objects.equals(this.declawed, catAllOf.declawed); - } - - @Override - public int hashCode() { - return Objects.hash(declawed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CatAllOf {\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/DogAllOf.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/DogAllOf.java deleted file mode 100644 index 5784d207b4d..00000000000 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/model/DogAllOf.java +++ /dev/null @@ -1,86 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * DogAllOf - */ - -@JsonTypeName("Dog_allOf") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class DogAllOf { - - private String breed; - - public DogAllOf breed(String breed) { - this.breed = breed; - return this; - } - - /** - * Get breed - * @return breed - */ - - @ApiModelProperty(value = "") - @JsonProperty("breed") - public String getBreed() { - return breed; - } - - public void setBreed(String breed) { - this.breed = breed; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DogAllOf dogAllOf = (DogAllOf) o; - return Objects.equals(this.breed, dogAllOf.breed); - } - - @Override - public int hashCode() { - return Objects.hash(breed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DogAllOf {\n"); - sb.append(" breed: ").append(toIndentedString(breed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/resources/openapi.yaml index 7a2cc752908..c07f4f9b8a8 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/resources/openapi.yaml @@ -1683,11 +1683,17 @@ components: Dog: allOf: - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Dog_allOf' + - properties: + breed: + type: string + type: object Cat: allOf: - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Cat_allOf' + - properties: + declawed: + type: boolean + type: object Animal: discriminator: propertyName: className @@ -2474,18 +2480,6 @@ components: type: string required: - requiredFile - Dog_allOf: - properties: - breed: - type: string - type: object - example: null - Cat_allOf: - properties: - declawed: - type: boolean - type: object - example: null securitySchemes: petstore_auth: flows: diff --git a/samples/server/petstore/springboot-spring-pageable/.openapi-generator/FILES b/samples/server/petstore/springboot-spring-pageable/.openapi-generator/FILES index 1fc22e59740..3eb92a4787f 100644 --- a/samples/server/petstore/springboot-spring-pageable/.openapi-generator/FILES +++ b/samples/server/petstore/springboot-spring-pageable/.openapi-generator/FILES @@ -34,12 +34,10 @@ src/main/java/org/openapitools/model/ArrayOfNumberOnly.java src/main/java/org/openapitools/model/ArrayTest.java src/main/java/org/openapitools/model/Capitalization.java src/main/java/org/openapitools/model/Cat.java -src/main/java/org/openapitools/model/CatAllOf.java src/main/java/org/openapitools/model/Category.java src/main/java/org/openapitools/model/ClassModel.java src/main/java/org/openapitools/model/Client.java src/main/java/org/openapitools/model/Dog.java -src/main/java/org/openapitools/model/DogAllOf.java src/main/java/org/openapitools/model/EnumArrays.java src/main/java/org/openapitools/model/EnumClass.java src/main/java/org/openapitools/model/EnumTest.java diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/CatAllOf.java deleted file mode 100644 index 85c6885ae00..00000000000 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/CatAllOf.java +++ /dev/null @@ -1,86 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * CatAllOf - */ - -@JsonTypeName("Cat_allOf") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class CatAllOf { - - private Boolean declawed; - - public CatAllOf declawed(Boolean declawed) { - this.declawed = declawed; - return this; - } - - /** - * Get declawed - * @return declawed - */ - - @ApiModelProperty(value = "") - @JsonProperty("declawed") - public Boolean getDeclawed() { - return declawed; - } - - public void setDeclawed(Boolean declawed) { - this.declawed = declawed; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CatAllOf catAllOf = (CatAllOf) o; - return Objects.equals(this.declawed, catAllOf.declawed); - } - - @Override - public int hashCode() { - return Objects.hash(declawed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CatAllOf {\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/DogAllOf.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/DogAllOf.java deleted file mode 100644 index 5784d207b4d..00000000000 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/model/DogAllOf.java +++ /dev/null @@ -1,86 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * DogAllOf - */ - -@JsonTypeName("Dog_allOf") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class DogAllOf { - - private String breed; - - public DogAllOf breed(String breed) { - this.breed = breed; - return this; - } - - /** - * Get breed - * @return breed - */ - - @ApiModelProperty(value = "") - @JsonProperty("breed") - public String getBreed() { - return breed; - } - - public void setBreed(String breed) { - this.breed = breed; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DogAllOf dogAllOf = (DogAllOf) o; - return Objects.equals(this.breed, dogAllOf.breed); - } - - @Override - public int hashCode() { - return Objects.hash(breed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DogAllOf {\n"); - sb.append(" breed: ").append(toIndentedString(breed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-spring-pageable/src/main/resources/openapi.yaml index 7a2cc752908..c07f4f9b8a8 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-spring-pageable/src/main/resources/openapi.yaml @@ -1683,11 +1683,17 @@ components: Dog: allOf: - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Dog_allOf' + - properties: + breed: + type: string + type: object Cat: allOf: - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Cat_allOf' + - properties: + declawed: + type: boolean + type: object Animal: discriminator: propertyName: className @@ -2474,18 +2480,6 @@ components: type: string required: - requiredFile - Dog_allOf: - properties: - breed: - type: string - type: object - example: null - Cat_allOf: - properties: - declawed: - type: boolean - type: object - example: null securitySchemes: petstore_auth: flows: diff --git a/samples/server/petstore/springboot-useoptional/.openapi-generator/FILES b/samples/server/petstore/springboot-useoptional/.openapi-generator/FILES index 946be002561..8360f1fc4d3 100644 --- a/samples/server/petstore/springboot-useoptional/.openapi-generator/FILES +++ b/samples/server/petstore/springboot-useoptional/.openapi-generator/FILES @@ -31,16 +31,13 @@ src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java src/main/java/org/openapitools/model/ArrayOfNumberOnly.java src/main/java/org/openapitools/model/ArrayTest.java src/main/java/org/openapitools/model/BigCat.java -src/main/java/org/openapitools/model/BigCatAllOf.java src/main/java/org/openapitools/model/Capitalization.java src/main/java/org/openapitools/model/Cat.java -src/main/java/org/openapitools/model/CatAllOf.java src/main/java/org/openapitools/model/Category.java src/main/java/org/openapitools/model/ClassModel.java src/main/java/org/openapitools/model/Client.java src/main/java/org/openapitools/model/ContainerDefaultValue.java src/main/java/org/openapitools/model/Dog.java -src/main/java/org/openapitools/model/DogAllOf.java src/main/java/org/openapitools/model/EnumArrays.java src/main/java/org/openapitools/model/EnumClass.java src/main/java/org/openapitools/model/EnumTest.java diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/BigCatAllOf.java deleted file mode 100644 index 59ab1d8d2bf..00000000000 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/BigCatAllOf.java +++ /dev/null @@ -1,126 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * BigCatAllOf - */ - -@JsonTypeName("BigCat_allOf") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class BigCatAllOf { - - /** - * Gets or Sets kind - */ - public enum KindEnum { - LIONS("lions"), - - TIGERS("tigers"), - - LEOPARDS("leopards"), - - JAGUARS("jaguars"); - - private String value; - - KindEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static KindEnum fromValue(String value) { - for (KindEnum b : KindEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - private KindEnum kind; - - public BigCatAllOf kind(KindEnum kind) { - this.kind = kind; - return this; - } - - /** - * Get kind - * @return kind - */ - - @ApiModelProperty(value = "") - @JsonProperty("kind") - public KindEnum getKind() { - return kind; - } - - public void setKind(KindEnum kind) { - this.kind = kind; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BigCatAllOf bigCatAllOf = (BigCatAllOf) o; - return Objects.equals(this.kind, bigCatAllOf.kind); - } - - @Override - public int hashCode() { - return Objects.hash(kind); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BigCatAllOf {\n"); - sb.append(" kind: ").append(toIndentedString(kind)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/CatAllOf.java deleted file mode 100644 index 85c6885ae00..00000000000 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/CatAllOf.java +++ /dev/null @@ -1,86 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * CatAllOf - */ - -@JsonTypeName("Cat_allOf") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class CatAllOf { - - private Boolean declawed; - - public CatAllOf declawed(Boolean declawed) { - this.declawed = declawed; - return this; - } - - /** - * Get declawed - * @return declawed - */ - - @ApiModelProperty(value = "") - @JsonProperty("declawed") - public Boolean getDeclawed() { - return declawed; - } - - public void setDeclawed(Boolean declawed) { - this.declawed = declawed; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CatAllOf catAllOf = (CatAllOf) o; - return Objects.equals(this.declawed, catAllOf.declawed); - } - - @Override - public int hashCode() { - return Objects.hash(declawed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CatAllOf {\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/DogAllOf.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/DogAllOf.java deleted file mode 100644 index 5784d207b4d..00000000000 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/DogAllOf.java +++ /dev/null @@ -1,86 +0,0 @@ -package org.openapitools.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * DogAllOf - */ - -@JsonTypeName("Dog_allOf") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class DogAllOf { - - private String breed; - - public DogAllOf breed(String breed) { - this.breed = breed; - return this; - } - - /** - * Get breed - * @return breed - */ - - @ApiModelProperty(value = "") - @JsonProperty("breed") - public String getBreed() { - return breed; - } - - public void setBreed(String breed) { - this.breed = breed; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DogAllOf dogAllOf = (DogAllOf) o; - return Objects.equals(this.breed, dogAllOf.breed); - } - - @Override - public int hashCode() { - return Objects.hash(breed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DogAllOf {\n"); - sb.append(" breed: ").append(toIndentedString(breed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/springboot-useoptional/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-useoptional/src/main/resources/openapi.yaml index 260abafd6ea..98f0e7e6f9d 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-useoptional/src/main/resources/openapi.yaml @@ -1439,15 +1439,29 @@ components: Dog: allOf: - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Dog_allOf' + - properties: + breed: + type: string + type: object Cat: allOf: - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Cat_allOf' + - properties: + declawed: + type: boolean + type: object BigCat: allOf: - $ref: '#/components/schemas/Cat' - - $ref: '#/components/schemas/BigCat_allOf' + - properties: + kind: + enum: + - lions + - tigers + - leopards + - jaguars + type: string + type: object Animal: discriminator: propertyName: className @@ -2290,29 +2304,6 @@ components: required: - requiredFile type: object - Dog_allOf: - properties: - breed: - type: string - type: object - example: null - Cat_allOf: - properties: - declawed: - type: boolean - type: object - example: null - BigCat_allOf: - properties: - kind: - enum: - - lions - - tigers - - leopards - - jaguars - type: string - type: object - example: null securitySchemes: petstore_auth: flows: diff --git a/samples/server/petstore/springboot-virtualan/.openapi-generator/FILES b/samples/server/petstore/springboot-virtualan/.openapi-generator/FILES index 8ba55df4658..7d38d2b7a00 100644 --- a/samples/server/petstore/springboot-virtualan/.openapi-generator/FILES +++ b/samples/server/petstore/springboot-virtualan/.openapi-generator/FILES @@ -31,16 +31,13 @@ src/main/java/org/openapitools/virtualan/model/ArrayOfArrayOfNumberOnly.java src/main/java/org/openapitools/virtualan/model/ArrayOfNumberOnly.java src/main/java/org/openapitools/virtualan/model/ArrayTest.java src/main/java/org/openapitools/virtualan/model/BigCat.java -src/main/java/org/openapitools/virtualan/model/BigCatAllOf.java src/main/java/org/openapitools/virtualan/model/Capitalization.java src/main/java/org/openapitools/virtualan/model/Cat.java -src/main/java/org/openapitools/virtualan/model/CatAllOf.java src/main/java/org/openapitools/virtualan/model/Category.java src/main/java/org/openapitools/virtualan/model/ClassModel.java src/main/java/org/openapitools/virtualan/model/Client.java src/main/java/org/openapitools/virtualan/model/ContainerDefaultValue.java src/main/java/org/openapitools/virtualan/model/Dog.java -src/main/java/org/openapitools/virtualan/model/DogAllOf.java src/main/java/org/openapitools/virtualan/model/EnumArrays.java src/main/java/org/openapitools/virtualan/model/EnumClass.java src/main/java/org/openapitools/virtualan/model/EnumTest.java diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/BigCatAllOf.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/BigCatAllOf.java deleted file mode 100644 index daf0315ddcb..00000000000 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/BigCatAllOf.java +++ /dev/null @@ -1,125 +0,0 @@ -package org.openapitools.virtualan.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; -import io.swagger.v3.oas.annotations.media.Schema; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * BigCatAllOf - */ - -@JsonTypeName("BigCat_allOf") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class BigCatAllOf { - - /** - * Gets or Sets kind - */ - public enum KindEnum { - LIONS("lions"), - - TIGERS("tigers"), - - LEOPARDS("leopards"), - - JAGUARS("jaguars"); - - private String value; - - KindEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static KindEnum fromValue(String value) { - for (KindEnum b : KindEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - private KindEnum kind; - - public BigCatAllOf kind(KindEnum kind) { - this.kind = kind; - return this; - } - - /** - * Get kind - * @return kind - */ - - @Schema(name = "kind", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("kind") - public KindEnum getKind() { - return kind; - } - - public void setKind(KindEnum kind) { - this.kind = kind; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BigCatAllOf bigCatAllOf = (BigCatAllOf) o; - return Objects.equals(this.kind, bigCatAllOf.kind); - } - - @Override - public int hashCode() { - return Objects.hash(kind); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BigCatAllOf {\n"); - sb.append(" kind: ").append(toIndentedString(kind)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/CatAllOf.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/CatAllOf.java deleted file mode 100644 index 6959f4c07e5..00000000000 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/CatAllOf.java +++ /dev/null @@ -1,85 +0,0 @@ -package org.openapitools.virtualan.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; -import io.swagger.v3.oas.annotations.media.Schema; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * CatAllOf - */ - -@JsonTypeName("Cat_allOf") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class CatAllOf { - - private Boolean declawed; - - public CatAllOf declawed(Boolean declawed) { - this.declawed = declawed; - return this; - } - - /** - * Get declawed - * @return declawed - */ - - @Schema(name = "declawed", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("declawed") - public Boolean getDeclawed() { - return declawed; - } - - public void setDeclawed(Boolean declawed) { - this.declawed = declawed; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CatAllOf catAllOf = (CatAllOf) o; - return Objects.equals(this.declawed, catAllOf.declawed); - } - - @Override - public int hashCode() { - return Objects.hash(declawed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CatAllOf {\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/DogAllOf.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/DogAllOf.java deleted file mode 100644 index 92fd0a1003a..00000000000 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/DogAllOf.java +++ /dev/null @@ -1,85 +0,0 @@ -package org.openapitools.virtualan.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; -import io.swagger.v3.oas.annotations.media.Schema; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * DogAllOf - */ - -@JsonTypeName("Dog_allOf") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class DogAllOf { - - private String breed; - - public DogAllOf breed(String breed) { - this.breed = breed; - return this; - } - - /** - * Get breed - * @return breed - */ - - @Schema(name = "breed", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("breed") - public String getBreed() { - return breed; - } - - public void setBreed(String breed) { - this.breed = breed; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DogAllOf dogAllOf = (DogAllOf) o; - return Objects.equals(this.breed, dogAllOf.breed); - } - - @Override - public int hashCode() { - return Objects.hash(breed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DogAllOf {\n"); - sb.append(" breed: ").append(toIndentedString(breed)).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(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/samples/server/petstore/springboot-virtualan/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-virtualan/src/main/resources/openapi.yaml index 260abafd6ea..98f0e7e6f9d 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-virtualan/src/main/resources/openapi.yaml @@ -1439,15 +1439,29 @@ components: Dog: allOf: - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Dog_allOf' + - properties: + breed: + type: string + type: object Cat: allOf: - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Cat_allOf' + - properties: + declawed: + type: boolean + type: object BigCat: allOf: - $ref: '#/components/schemas/Cat' - - $ref: '#/components/schemas/BigCat_allOf' + - properties: + kind: + enum: + - lions + - tigers + - leopards + - jaguars + type: string + type: object Animal: discriminator: propertyName: className @@ -2290,29 +2304,6 @@ components: required: - requiredFile type: object - Dog_allOf: - properties: - breed: - type: string - type: object - example: null - Cat_allOf: - properties: - declawed: - type: boolean - type: object - example: null - BigCat_allOf: - properties: - kind: - enum: - - lions - - tigers - - leopards - - jaguars - type: string - type: object - example: null securitySchemes: petstore_auth: flows: diff --git a/samples/server/petstore/springboot/.openapi-generator/FILES b/samples/server/petstore/springboot/.openapi-generator/FILES index 1a5080e6434..857b86d938f 100644 --- a/samples/server/petstore/springboot/.openapi-generator/FILES +++ b/samples/server/petstore/springboot/.openapi-generator/FILES @@ -31,16 +31,13 @@ src/main/java/org/openapitools/model/ApiResponseDto.java src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnlyDto.java src/main/java/org/openapitools/model/ArrayOfNumberOnlyDto.java src/main/java/org/openapitools/model/ArrayTestDto.java -src/main/java/org/openapitools/model/BigCatAllOfDto.java src/main/java/org/openapitools/model/BigCatDto.java src/main/java/org/openapitools/model/CapitalizationDto.java -src/main/java/org/openapitools/model/CatAllOfDto.java src/main/java/org/openapitools/model/CatDto.java src/main/java/org/openapitools/model/CategoryDto.java src/main/java/org/openapitools/model/ClassModelDto.java src/main/java/org/openapitools/model/ClientDto.java src/main/java/org/openapitools/model/ContainerDefaultValueDto.java -src/main/java/org/openapitools/model/DogAllOfDto.java src/main/java/org/openapitools/model/DogDto.java src/main/java/org/openapitools/model/EnumArraysDto.java src/main/java/org/openapitools/model/EnumClassDto.java diff --git a/samples/server/petstore/springboot/src/main/resources/openapi.yaml b/samples/server/petstore/springboot/src/main/resources/openapi.yaml index 2151d60d758..713de124993 100644 --- a/samples/server/petstore/springboot/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot/src/main/resources/openapi.yaml @@ -1439,15 +1439,29 @@ components: Dog: allOf: - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Dog_allOf' + - properties: + breed: + type: string + type: object Cat: allOf: - $ref: '#/components/schemas/Animal' - - $ref: '#/components/schemas/Cat_allOf' + - properties: + declawed: + type: boolean + type: object BigCat: allOf: - $ref: '#/components/schemas/Cat' - - $ref: '#/components/schemas/BigCat_allOf' + - properties: + kind: + enum: + - lions + - tigers + - leopards + - jaguars + type: string + type: object Animal: discriminator: propertyName: className @@ -2282,29 +2296,6 @@ components: required: - requiredFile type: object - Dog_allOf: - properties: - breed: - type: string - type: object - example: null - Cat_allOf: - properties: - declawed: - type: boolean - type: object - example: null - BigCat_allOf: - properties: - kind: - enum: - - lions - - tigers - - leopards - - jaguars - type: string - type: object - example: null securitySchemes: petstore_auth: flows: