From fd000c6033c0201ac9a2ca88625bde1226278f17 Mon Sep 17 00:00:00 2001 From: "Jean Pierre Mandujano G." Date: Wed, 14 Oct 2026 01:25:53 -0500 Subject: [PATCH 1/2] Fix JSON types for empty object examples --- .../codegen/examples/ExampleGenerator.java | 5 +- .../codegen/ExampleGeneratorTest.java | 103 ++++++++++++++++++ 2 files changed, 107 insertions(+), 1 deletion(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/examples/ExampleGenerator.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/examples/ExampleGenerator.java index 010a0f93aaef..5a88321a6085 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/examples/ExampleGenerator.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/examples/ExampleGenerator.java @@ -322,7 +322,7 @@ private Object resolvePropertyToExample(String propertyName, String mediaType, S return resolveModelToExample(simpleName, mediaType, schema, processedModels); } else if (ModelUtils.isObjectSchema(property)) { - return "{}"; + return new LinkedHashMap<>(); } return ""; @@ -379,6 +379,9 @@ private Object resolveModelToExample(String name, String mediaType, Schema schem return resolvePropertyToExample(name, mediaType, found.get(), processedModels); } else if (ModelUtils.isArraySchema(schema) || ModelUtils.isEnumSchema(schema)) { return resolvePropertyToExample(schema.getName(), mediaType, schema, processedModels); + } else if (ModelUtils.isObjectSchema(schema)) { + schema.setExample(values); + return schema.getExample(); } else { // TODO log an error message as the model does not have any properties return null; diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/ExampleGeneratorTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/ExampleGeneratorTest.java index 00cdbbec9a17..c62b10376d0d 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/ExampleGeneratorTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/ExampleGeneratorTest.java @@ -1,13 +1,19 @@ package org.openapitools.codegen; import io.swagger.v3.oas.models.OpenAPI; +import io.swagger.v3.oas.models.media.ArraySchema; +import io.swagger.v3.oas.models.media.MapSchema; +import io.swagger.v3.oas.models.media.ObjectSchema; import io.swagger.v3.oas.models.media.Schema; import io.swagger.v3.oas.models.media.IntegerSchema; +import io.swagger.v3.oas.models.media.StringSchema; import org.openapitools.codegen.examples.ExampleGenerator; +import org.testng.annotations.DataProvider; import org.testng.annotations.Test; import java.util.*; +import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; import static org.testng.AssertJUnit.assertEquals; @@ -15,6 +21,103 @@ import static org.testng.AssertJUnit.assertTrue; public class ExampleGeneratorTest { + @DataProvider(name = "emptyObjectSchemas") + public Object[][] emptyObjectSchemas() { + return new Object[][] { + {new ObjectSchema()}, + {new Schema<>().type("object")}, + {new ObjectSchema().properties(new LinkedHashMap<>())}, + {new Schema<>().type("object").additionalProperties(false)} + }; + } + + @Test(dataProvider = "emptyObjectSchemas") + public void generateNestedEmptyObject(Schema emptyObject) throws Exception { + Schema reading = new ObjectSchema().addProperties("metadata", emptyObject); + OpenAPI openAPI = TestUtils.createOpenAPIWithOneSchema("Reading", reading); + ExampleGenerator generator = new ExampleGenerator(openAPI.getComponents().getSchemas(), openAPI); + + List> examples = generator.generate(null, Collections.singletonList("application/json"), "Reading"); + JsonNode metadata = new ObjectMapper().readTree(examples.get(0).get("example")).get("metadata"); + + assertTrue(metadata.isObject()); + assertEquals(0, metadata.size()); + } + + @Test(dataProvider = "emptyObjectSchemas") + public void generateTopLevelEmptyObject(Schema emptyObject) throws Exception { + OpenAPI openAPI = TestUtils.createOpenAPIWithOneSchema("Anything", emptyObject); + ExampleGenerator generator = new ExampleGenerator(openAPI.getComponents().getSchemas(), openAPI); + + List> examples = generator.generate(null, Collections.singletonList("application/json"), "Anything"); + JsonNode example = new ObjectMapper().readTree(examples.get(0).get("example")); + + assertTrue(example.isObject()); + assertEquals(0, example.size()); + } + + @Test + public void generateRepeatedReferencesToEmptyObject() throws Exception { + Schema reading = new ObjectSchema() + .addProperties("first", new Schema<>().$ref("#/components/schemas/Anything")) + .addProperties("second", new Schema<>().$ref("#/components/schemas/Anything")); + OpenAPI openAPI = TestUtils.createOpenAPIWithOneSchema("Reading", reading); + openAPI.getComponents().addSchemas("Anything", new ObjectSchema()); + ExampleGenerator generator = new ExampleGenerator(openAPI.getComponents().getSchemas(), openAPI); + + List> examples = generator.generate(null, Collections.singletonList("application/json"), "Reading"); + JsonNode example = new ObjectMapper().readTree(examples.get(0).get("example")); + + assertTrue(example.get("first").isObject()); + assertEquals(0, example.get("first").size()); + assertEquals(example.get("first"), example.get("second")); + } + + @Test + public void generateArrayOfEmptyObjects() throws Exception { + Schema array = new ArraySchema().items(new ObjectSchema()); + OpenAPI openAPI = TestUtils.createOpenAPIWithOneSchema("Array", array); + ExampleGenerator generator = new ExampleGenerator(openAPI.getComponents().getSchemas(), openAPI); + + List> examples = generator.generate(null, Collections.singletonList("application/json"), "Array"); + JsonNode example = new ObjectMapper().readTree(examples.get(0).get("example")); + + assertTrue(example.isArray()); + assertEquals(2, example.size()); + assertTrue(example.get(0).isObject()); + assertEquals(0, example.get(0).size()); + assertEquals(example.get(0), example.get(1)); + } + + @Test + public void generateObjectKeepsExplicitExampleAndMapValues() throws Exception { + Schema reading = new ObjectSchema() + .addProperties("metadata", new Schema<>().type("object").example(Collections.singletonMap("name", "explicit"))) + .addProperties("labels", new MapSchema().additionalProperties(new StringSchema().example("value"))); + OpenAPI openAPI = TestUtils.createOpenAPIWithOneSchema("Reading", reading); + ExampleGenerator generator = new ExampleGenerator(openAPI.getComponents().getSchemas(), openAPI); + + List> examples = generator.generate(null, Collections.singletonList("application/json"), "Reading"); + JsonNode example = new ObjectMapper().readTree(examples.get(0).get("example")); + + assertEquals(new ObjectMapper().readTree("{\"name\":\"explicit\"}"), example.get("metadata")); + assertEquals(new ObjectMapper().readTree("{\"key\":\"value\"}"), example.get("labels")); + } + + @Test + public void generateUnresolvedReferenceKeepsExistingFallback() throws Exception { + OpenAPI openAPI = TestUtils.createOpenAPI(); + ExampleGenerator generator = new ExampleGenerator(Collections.emptyMap(), openAPI); + Schema reference = new Schema<>().$ref("#/components/schemas/Missing"); + + List> examples = generator.generate(null, Collections.singletonList("application/json"), reference); + JsonNode example = new ObjectMapper().readTree(examples.get(0).get("example")); + + // An unresolved reference does not establish that the missing schema is an object. + assertTrue(example.isTextual()); + assertEquals("{}", example.asText()); + } + @Test public void generateFromResponseSchemaWithPrimitiveType() { OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/3_0/example_generator_test.yaml"); From e5541a2a63bb3defdba52fee3d3168ec5a45d6e5 Mon Sep 17 00:00:00 2001 From: "Jean Pierre Mandujano G." Date: Wed, 14 Oct 2026 10:49:33 -0500 Subject: [PATCH 2/2] Preserve named map examples and refresh generated samples --- .../codegen/examples/ExampleGenerator.java | 3 ++ .../codegen/ExampleGeneratorTest.java | 45 +++++++++++++++++++ .../latest/UseDateTimeOffset/api/openapi.yaml | 10 +++-- .../net10/FormModels/api/openapi.yaml | 10 +++-- .../net10/NullReferenceTypes/api/openapi.yaml | 10 +++-- .../net10/Petstore/api/openapi.yaml | 10 +++-- .../net10/SourceGeneration/api/openapi.yaml | 10 +++-- .../net4.7/FormModels/api/openapi.yaml | 10 +++-- .../net4.7/Petstore/api/openapi.yaml | 10 +++-- .../net4.8/FormModels/api/openapi.yaml | 10 +++-- .../net4.8/Petstore/api/openapi.yaml | 10 +++-- .../net8/FormModels/api/openapi.yaml | 10 +++-- .../net8/NullReferenceTypes/api/openapi.yaml | 10 +++-- .../net8/Petstore/api/openapi.yaml | 10 +++-- .../net8/SourceGeneration/api/openapi.yaml | 10 +++-- .../net9/FormModels/api/openapi.yaml | 10 +++-- .../net9/NullReferenceTypes/api/openapi.yaml | 10 +++-- .../net9/Petstore/api/openapi.yaml | 10 +++-- .../net9/SourceGeneration/api/openapi.yaml | 10 +++-- .../standard2.0/Petstore/api/openapi.yaml | 10 +++-- .../net10/Petstore/api/openapi.yaml | 10 +++-- .../httpclient/net9/Petstore/api/openapi.yaml | 10 +++-- .../standard2.0/Petstore/api/openapi.yaml | 10 +++-- .../restsharp/net10/Petstore/api/openapi.yaml | 10 +++-- .../net4.7/Petstore/api/openapi.yaml | 10 +++-- .../net4.8/Petstore/api/openapi.yaml | 10 +++-- .../net8/EnumMappings/api/openapi.yaml | 10 +++-- .../restsharp/net8/Petstore/api/openapi.yaml | 10 +++-- .../net9/EnumMappings/api/openapi.yaml | 10 +++-- .../ConditionalSerialization/api/openapi.yaml | 10 +++-- .../standard2.0/Petstore/api/openapi.yaml | 10 +++-- .../net10/Petstore/api/openapi.yaml | 10 +++-- .../net9/Petstore/api/openapi.yaml | 10 +++-- .../standard2.0/Petstore/api/openapi.yaml | 10 +++-- .../java/jersey3-jackson3/api/openapi.yaml | 4 +- .../petstore/java/jersey3/api/openapi.yaml | 4 +- .../java/native-async/api/openapi.yaml | 4 +- .../java/native-jackson3/api/openapi.yaml | 4 +- .../petstore/java/native/api/openapi.yaml | 4 +- .../java/okhttp-gson-3.1/api/openapi.yaml | 1 + .../java/okhttp-gson/api/openapi.yaml | 22 ++++----- .../petstore/go/go-petstore/api/openapi.yaml | 4 +- .../java/jersey2-java8/api/openapi.yaml | 4 +- .../output/openapi-v3/api/openapi.yaml | 7 +++ 44 files changed, 273 insertions(+), 153 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/examples/ExampleGenerator.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/examples/ExampleGenerator.java index ceb0993dff07..5d60528d54ed 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/examples/ExampleGenerator.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/examples/ExampleGenerator.java @@ -379,6 +379,9 @@ private Object resolveModelToExample(String name, String mediaType, Schema schem return resolvePropertyToExample(name, mediaType, found.get(), processedModels); } else if (ModelUtils.isArraySchema(schema) || ModelUtils.isEnumSchema(schema)) { return resolvePropertyToExample(schema.getName(), mediaType, schema, processedModels); + } else if (ModelUtils.isMapSchema(schema)) { + schema.setExample(resolvePropertyToExample(name, mediaType, schema, processedModels)); + return schema.getExample(); } else if (ModelUtils.isObjectSchema(schema)) { schema.setExample(values); return schema.getExample(); diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/ExampleGeneratorTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/ExampleGeneratorTest.java index 6c787ed76483..ef9895b63e13 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/ExampleGeneratorTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/ExampleGeneratorTest.java @@ -2,6 +2,7 @@ import io.swagger.v3.oas.models.OpenAPI; import io.swagger.v3.oas.models.media.ArraySchema; +import io.swagger.v3.oas.models.media.JsonSchema; import io.swagger.v3.oas.models.media.MapSchema; import io.swagger.v3.oas.models.media.ObjectSchema; import io.swagger.v3.oas.models.media.Schema; @@ -21,6 +22,50 @@ import static org.testng.AssertJUnit.assertTrue; public class ExampleGeneratorTest { + @DataProvider(name = "namedMapSchemas") + public Object[][] namedMapSchemas() { + return new Object[][] { + {new ObjectSchema().additionalProperties(new StringSchema().example("value"))}, + {new Schema<>().type("object").additionalProperties(new StringSchema().example("value"))}, + {new MapSchema().additionalProperties(new StringSchema().example("value"))}, + {new JsonSchema().type("object").additionalProperties(new StringSchema().example("value"))} + }; + } + + @Test(dataProvider = "namedMapSchemas") + public void generateNamedMapKeepsAdditionalPropertyValues(Schema mapSchema) throws Exception { + OpenAPI openAPI = TestUtils.createOpenAPIWithOneSchema("Labels", mapSchema); + ExampleGenerator generator = new ExampleGenerator(openAPI.getComponents().getSchemas(), openAPI); + + List> examples = generator.generate(null, Arrays.asList("application/json", "*/*"), "Labels"); + ObjectMapper mapper = new ObjectMapper(); + + assertEquals(2, examples.size()); + for (Map example : examples) { + assertEquals(mapper.readTree("{\"key\":\"value\"}"), mapper.readTree(example.get("example"))); + } + } + + @Test(dataProvider = "namedMapSchemas") + public void generateRepeatedReferencesToNamedMap(Schema mapSchema) throws Exception { + Schema reading = new ObjectSchema() + .addProperties("first", new Schema<>().$ref("#/components/schemas/Labels")) + .addProperties("second", new Schema<>().$ref("#/components/schemas/Labels")); + OpenAPI openAPI = TestUtils.createOpenAPIWithOneSchema("Reading", reading); + openAPI.getComponents().addSchemas("Labels", mapSchema); + ExampleGenerator generator = new ExampleGenerator(openAPI.getComponents().getSchemas(), openAPI); + + List> examples = generator.generate(null, Arrays.asList("application/json", "*/*"), "Reading"); + ObjectMapper mapper = new ObjectMapper(); + + assertEquals(2, examples.size()); + for (Map generated : examples) { + JsonNode example = mapper.readTree(generated.get("example")); + assertEquals(mapper.readTree("{\"key\":\"value\"}"), example.get("first")); + assertEquals(example.get("first"), example.get("second")); + } + } + @DataProvider(name = "emptyObjectSchemas") public Object[][] emptyObjectSchemas() { return new Object[][] { diff --git a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/api/openapi.yaml b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/api/openapi.yaml index d8b36a9d220b..c690f13ee0aa 100644 --- a/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/api/openapi.yaml +++ b/samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/api/openapi.yaml @@ -1459,8 +1459,8 @@ components: password: password phone: phone userStatus: 6 - objectWithNoDeclaredProps: "{}" - objectWithNoDeclaredPropsNullable: "{}" + objectWithNoDeclaredProps: {} + objectWithNoDeclaredPropsNullable: {} anyTypeProp: "" anyTypePropNullable: "" properties: @@ -2815,6 +2815,8 @@ components: Custom-Variableobject-Response: additionalProperties: true description: A Variable object without predefined property names + example: + key: "" type: object Field-pkiNotificationtestID: type: integer @@ -2822,8 +2824,8 @@ components: example: pkiNotificationtestID: 0 a_objVariableobject: - - null - - null + - key: "" + - key: "" properties: pkiNotificationtestID: type: integer diff --git a/samples/client/petstore/csharp/generichost/net10/FormModels/api/openapi.yaml b/samples/client/petstore/csharp/generichost/net10/FormModels/api/openapi.yaml index a35e05a60c55..ee3af221459f 100644 --- a/samples/client/petstore/csharp/generichost/net10/FormModels/api/openapi.yaml +++ b/samples/client/petstore/csharp/generichost/net10/FormModels/api/openapi.yaml @@ -1423,8 +1423,8 @@ components: password: password phone: phone userStatus: 6 - objectWithNoDeclaredProps: "{}" - objectWithNoDeclaredPropsNullable: "{}" + objectWithNoDeclaredProps: {} + objectWithNoDeclaredPropsNullable: {} anyTypeProp: "" anyTypePropNullable: "" properties: @@ -2637,6 +2637,8 @@ components: Custom-Variableobject-Response: additionalProperties: true description: A Variable object without predefined property names + example: + key: "" type: object Field-pkiNotificationtestID: type: integer @@ -2644,8 +2646,8 @@ components: example: pkiNotificationtestID: 0 a_objVariableobject: - - null - - null + - key: "" + - key: "" properties: pkiNotificationtestID: type: integer diff --git a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/api/openapi.yaml b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/api/openapi.yaml index d8b36a9d220b..c690f13ee0aa 100644 --- a/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/api/openapi.yaml +++ b/samples/client/petstore/csharp/generichost/net10/NullReferenceTypes/api/openapi.yaml @@ -1459,8 +1459,8 @@ components: password: password phone: phone userStatus: 6 - objectWithNoDeclaredProps: "{}" - objectWithNoDeclaredPropsNullable: "{}" + objectWithNoDeclaredProps: {} + objectWithNoDeclaredPropsNullable: {} anyTypeProp: "" anyTypePropNullable: "" properties: @@ -2815,6 +2815,8 @@ components: Custom-Variableobject-Response: additionalProperties: true description: A Variable object without predefined property names + example: + key: "" type: object Field-pkiNotificationtestID: type: integer @@ -2822,8 +2824,8 @@ components: example: pkiNotificationtestID: 0 a_objVariableobject: - - null - - null + - key: "" + - key: "" properties: pkiNotificationtestID: type: integer diff --git a/samples/client/petstore/csharp/generichost/net10/Petstore/api/openapi.yaml b/samples/client/petstore/csharp/generichost/net10/Petstore/api/openapi.yaml index d8b36a9d220b..c690f13ee0aa 100644 --- a/samples/client/petstore/csharp/generichost/net10/Petstore/api/openapi.yaml +++ b/samples/client/petstore/csharp/generichost/net10/Petstore/api/openapi.yaml @@ -1459,8 +1459,8 @@ components: password: password phone: phone userStatus: 6 - objectWithNoDeclaredProps: "{}" - objectWithNoDeclaredPropsNullable: "{}" + objectWithNoDeclaredProps: {} + objectWithNoDeclaredPropsNullable: {} anyTypeProp: "" anyTypePropNullable: "" properties: @@ -2815,6 +2815,8 @@ components: Custom-Variableobject-Response: additionalProperties: true description: A Variable object without predefined property names + example: + key: "" type: object Field-pkiNotificationtestID: type: integer @@ -2822,8 +2824,8 @@ components: example: pkiNotificationtestID: 0 a_objVariableobject: - - null - - null + - key: "" + - key: "" properties: pkiNotificationtestID: type: integer diff --git a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/api/openapi.yaml b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/api/openapi.yaml index d8b36a9d220b..c690f13ee0aa 100644 --- a/samples/client/petstore/csharp/generichost/net10/SourceGeneration/api/openapi.yaml +++ b/samples/client/petstore/csharp/generichost/net10/SourceGeneration/api/openapi.yaml @@ -1459,8 +1459,8 @@ components: password: password phone: phone userStatus: 6 - objectWithNoDeclaredProps: "{}" - objectWithNoDeclaredPropsNullable: "{}" + objectWithNoDeclaredProps: {} + objectWithNoDeclaredPropsNullable: {} anyTypeProp: "" anyTypePropNullable: "" properties: @@ -2815,6 +2815,8 @@ components: Custom-Variableobject-Response: additionalProperties: true description: A Variable object without predefined property names + example: + key: "" type: object Field-pkiNotificationtestID: type: integer @@ -2822,8 +2824,8 @@ components: example: pkiNotificationtestID: 0 a_objVariableobject: - - null - - null + - key: "" + - key: "" properties: pkiNotificationtestID: type: integer diff --git a/samples/client/petstore/csharp/generichost/net4.7/FormModels/api/openapi.yaml b/samples/client/petstore/csharp/generichost/net4.7/FormModels/api/openapi.yaml index a35e05a60c55..ee3af221459f 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/FormModels/api/openapi.yaml +++ b/samples/client/petstore/csharp/generichost/net4.7/FormModels/api/openapi.yaml @@ -1423,8 +1423,8 @@ components: password: password phone: phone userStatus: 6 - objectWithNoDeclaredProps: "{}" - objectWithNoDeclaredPropsNullable: "{}" + objectWithNoDeclaredProps: {} + objectWithNoDeclaredPropsNullable: {} anyTypeProp: "" anyTypePropNullable: "" properties: @@ -2637,6 +2637,8 @@ components: Custom-Variableobject-Response: additionalProperties: true description: A Variable object without predefined property names + example: + key: "" type: object Field-pkiNotificationtestID: type: integer @@ -2644,8 +2646,8 @@ components: example: pkiNotificationtestID: 0 a_objVariableobject: - - null - - null + - key: "" + - key: "" properties: pkiNotificationtestID: type: integer diff --git a/samples/client/petstore/csharp/generichost/net4.7/Petstore/api/openapi.yaml b/samples/client/petstore/csharp/generichost/net4.7/Petstore/api/openapi.yaml index d8b36a9d220b..c690f13ee0aa 100644 --- a/samples/client/petstore/csharp/generichost/net4.7/Petstore/api/openapi.yaml +++ b/samples/client/petstore/csharp/generichost/net4.7/Petstore/api/openapi.yaml @@ -1459,8 +1459,8 @@ components: password: password phone: phone userStatus: 6 - objectWithNoDeclaredProps: "{}" - objectWithNoDeclaredPropsNullable: "{}" + objectWithNoDeclaredProps: {} + objectWithNoDeclaredPropsNullable: {} anyTypeProp: "" anyTypePropNullable: "" properties: @@ -2815,6 +2815,8 @@ components: Custom-Variableobject-Response: additionalProperties: true description: A Variable object without predefined property names + example: + key: "" type: object Field-pkiNotificationtestID: type: integer @@ -2822,8 +2824,8 @@ components: example: pkiNotificationtestID: 0 a_objVariableobject: - - null - - null + - key: "" + - key: "" properties: pkiNotificationtestID: type: integer diff --git a/samples/client/petstore/csharp/generichost/net4.8/FormModels/api/openapi.yaml b/samples/client/petstore/csharp/generichost/net4.8/FormModels/api/openapi.yaml index a35e05a60c55..ee3af221459f 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/FormModels/api/openapi.yaml +++ b/samples/client/petstore/csharp/generichost/net4.8/FormModels/api/openapi.yaml @@ -1423,8 +1423,8 @@ components: password: password phone: phone userStatus: 6 - objectWithNoDeclaredProps: "{}" - objectWithNoDeclaredPropsNullable: "{}" + objectWithNoDeclaredProps: {} + objectWithNoDeclaredPropsNullable: {} anyTypeProp: "" anyTypePropNullable: "" properties: @@ -2637,6 +2637,8 @@ components: Custom-Variableobject-Response: additionalProperties: true description: A Variable object without predefined property names + example: + key: "" type: object Field-pkiNotificationtestID: type: integer @@ -2644,8 +2646,8 @@ components: example: pkiNotificationtestID: 0 a_objVariableobject: - - null - - null + - key: "" + - key: "" properties: pkiNotificationtestID: type: integer diff --git a/samples/client/petstore/csharp/generichost/net4.8/Petstore/api/openapi.yaml b/samples/client/petstore/csharp/generichost/net4.8/Petstore/api/openapi.yaml index d8b36a9d220b..c690f13ee0aa 100644 --- a/samples/client/petstore/csharp/generichost/net4.8/Petstore/api/openapi.yaml +++ b/samples/client/petstore/csharp/generichost/net4.8/Petstore/api/openapi.yaml @@ -1459,8 +1459,8 @@ components: password: password phone: phone userStatus: 6 - objectWithNoDeclaredProps: "{}" - objectWithNoDeclaredPropsNullable: "{}" + objectWithNoDeclaredProps: {} + objectWithNoDeclaredPropsNullable: {} anyTypeProp: "" anyTypePropNullable: "" properties: @@ -2815,6 +2815,8 @@ components: Custom-Variableobject-Response: additionalProperties: true description: A Variable object without predefined property names + example: + key: "" type: object Field-pkiNotificationtestID: type: integer @@ -2822,8 +2824,8 @@ components: example: pkiNotificationtestID: 0 a_objVariableobject: - - null - - null + - key: "" + - key: "" properties: pkiNotificationtestID: type: integer diff --git a/samples/client/petstore/csharp/generichost/net8/FormModels/api/openapi.yaml b/samples/client/petstore/csharp/generichost/net8/FormModels/api/openapi.yaml index a35e05a60c55..ee3af221459f 100644 --- a/samples/client/petstore/csharp/generichost/net8/FormModels/api/openapi.yaml +++ b/samples/client/petstore/csharp/generichost/net8/FormModels/api/openapi.yaml @@ -1423,8 +1423,8 @@ components: password: password phone: phone userStatus: 6 - objectWithNoDeclaredProps: "{}" - objectWithNoDeclaredPropsNullable: "{}" + objectWithNoDeclaredProps: {} + objectWithNoDeclaredPropsNullable: {} anyTypeProp: "" anyTypePropNullable: "" properties: @@ -2637,6 +2637,8 @@ components: Custom-Variableobject-Response: additionalProperties: true description: A Variable object without predefined property names + example: + key: "" type: object Field-pkiNotificationtestID: type: integer @@ -2644,8 +2646,8 @@ components: example: pkiNotificationtestID: 0 a_objVariableobject: - - null - - null + - key: "" + - key: "" properties: pkiNotificationtestID: type: integer diff --git a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/api/openapi.yaml b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/api/openapi.yaml index d8b36a9d220b..c690f13ee0aa 100644 --- a/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/api/openapi.yaml +++ b/samples/client/petstore/csharp/generichost/net8/NullReferenceTypes/api/openapi.yaml @@ -1459,8 +1459,8 @@ components: password: password phone: phone userStatus: 6 - objectWithNoDeclaredProps: "{}" - objectWithNoDeclaredPropsNullable: "{}" + objectWithNoDeclaredProps: {} + objectWithNoDeclaredPropsNullable: {} anyTypeProp: "" anyTypePropNullable: "" properties: @@ -2815,6 +2815,8 @@ components: Custom-Variableobject-Response: additionalProperties: true description: A Variable object without predefined property names + example: + key: "" type: object Field-pkiNotificationtestID: type: integer @@ -2822,8 +2824,8 @@ components: example: pkiNotificationtestID: 0 a_objVariableobject: - - null - - null + - key: "" + - key: "" properties: pkiNotificationtestID: type: integer diff --git a/samples/client/petstore/csharp/generichost/net8/Petstore/api/openapi.yaml b/samples/client/petstore/csharp/generichost/net8/Petstore/api/openapi.yaml index d8b36a9d220b..c690f13ee0aa 100644 --- a/samples/client/petstore/csharp/generichost/net8/Petstore/api/openapi.yaml +++ b/samples/client/petstore/csharp/generichost/net8/Petstore/api/openapi.yaml @@ -1459,8 +1459,8 @@ components: password: password phone: phone userStatus: 6 - objectWithNoDeclaredProps: "{}" - objectWithNoDeclaredPropsNullable: "{}" + objectWithNoDeclaredProps: {} + objectWithNoDeclaredPropsNullable: {} anyTypeProp: "" anyTypePropNullable: "" properties: @@ -2815,6 +2815,8 @@ components: Custom-Variableobject-Response: additionalProperties: true description: A Variable object without predefined property names + example: + key: "" type: object Field-pkiNotificationtestID: type: integer @@ -2822,8 +2824,8 @@ components: example: pkiNotificationtestID: 0 a_objVariableobject: - - null - - null + - key: "" + - key: "" properties: pkiNotificationtestID: type: integer diff --git a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/api/openapi.yaml b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/api/openapi.yaml index d8b36a9d220b..c690f13ee0aa 100644 --- a/samples/client/petstore/csharp/generichost/net8/SourceGeneration/api/openapi.yaml +++ b/samples/client/petstore/csharp/generichost/net8/SourceGeneration/api/openapi.yaml @@ -1459,8 +1459,8 @@ components: password: password phone: phone userStatus: 6 - objectWithNoDeclaredProps: "{}" - objectWithNoDeclaredPropsNullable: "{}" + objectWithNoDeclaredProps: {} + objectWithNoDeclaredPropsNullable: {} anyTypeProp: "" anyTypePropNullable: "" properties: @@ -2815,6 +2815,8 @@ components: Custom-Variableobject-Response: additionalProperties: true description: A Variable object without predefined property names + example: + key: "" type: object Field-pkiNotificationtestID: type: integer @@ -2822,8 +2824,8 @@ components: example: pkiNotificationtestID: 0 a_objVariableobject: - - null - - null + - key: "" + - key: "" properties: pkiNotificationtestID: type: integer diff --git a/samples/client/petstore/csharp/generichost/net9/FormModels/api/openapi.yaml b/samples/client/petstore/csharp/generichost/net9/FormModels/api/openapi.yaml index a35e05a60c55..ee3af221459f 100644 --- a/samples/client/petstore/csharp/generichost/net9/FormModels/api/openapi.yaml +++ b/samples/client/petstore/csharp/generichost/net9/FormModels/api/openapi.yaml @@ -1423,8 +1423,8 @@ components: password: password phone: phone userStatus: 6 - objectWithNoDeclaredProps: "{}" - objectWithNoDeclaredPropsNullable: "{}" + objectWithNoDeclaredProps: {} + objectWithNoDeclaredPropsNullable: {} anyTypeProp: "" anyTypePropNullable: "" properties: @@ -2637,6 +2637,8 @@ components: Custom-Variableobject-Response: additionalProperties: true description: A Variable object without predefined property names + example: + key: "" type: object Field-pkiNotificationtestID: type: integer @@ -2644,8 +2646,8 @@ components: example: pkiNotificationtestID: 0 a_objVariableobject: - - null - - null + - key: "" + - key: "" properties: pkiNotificationtestID: type: integer diff --git a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/api/openapi.yaml b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/api/openapi.yaml index d8b36a9d220b..c690f13ee0aa 100644 --- a/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/api/openapi.yaml +++ b/samples/client/petstore/csharp/generichost/net9/NullReferenceTypes/api/openapi.yaml @@ -1459,8 +1459,8 @@ components: password: password phone: phone userStatus: 6 - objectWithNoDeclaredProps: "{}" - objectWithNoDeclaredPropsNullable: "{}" + objectWithNoDeclaredProps: {} + objectWithNoDeclaredPropsNullable: {} anyTypeProp: "" anyTypePropNullable: "" properties: @@ -2815,6 +2815,8 @@ components: Custom-Variableobject-Response: additionalProperties: true description: A Variable object without predefined property names + example: + key: "" type: object Field-pkiNotificationtestID: type: integer @@ -2822,8 +2824,8 @@ components: example: pkiNotificationtestID: 0 a_objVariableobject: - - null - - null + - key: "" + - key: "" properties: pkiNotificationtestID: type: integer diff --git a/samples/client/petstore/csharp/generichost/net9/Petstore/api/openapi.yaml b/samples/client/petstore/csharp/generichost/net9/Petstore/api/openapi.yaml index d8b36a9d220b..c690f13ee0aa 100644 --- a/samples/client/petstore/csharp/generichost/net9/Petstore/api/openapi.yaml +++ b/samples/client/petstore/csharp/generichost/net9/Petstore/api/openapi.yaml @@ -1459,8 +1459,8 @@ components: password: password phone: phone userStatus: 6 - objectWithNoDeclaredProps: "{}" - objectWithNoDeclaredPropsNullable: "{}" + objectWithNoDeclaredProps: {} + objectWithNoDeclaredPropsNullable: {} anyTypeProp: "" anyTypePropNullable: "" properties: @@ -2815,6 +2815,8 @@ components: Custom-Variableobject-Response: additionalProperties: true description: A Variable object without predefined property names + example: + key: "" type: object Field-pkiNotificationtestID: type: integer @@ -2822,8 +2824,8 @@ components: example: pkiNotificationtestID: 0 a_objVariableobject: - - null - - null + - key: "" + - key: "" properties: pkiNotificationtestID: type: integer diff --git a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/api/openapi.yaml b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/api/openapi.yaml index d8b36a9d220b..c690f13ee0aa 100644 --- a/samples/client/petstore/csharp/generichost/net9/SourceGeneration/api/openapi.yaml +++ b/samples/client/petstore/csharp/generichost/net9/SourceGeneration/api/openapi.yaml @@ -1459,8 +1459,8 @@ components: password: password phone: phone userStatus: 6 - objectWithNoDeclaredProps: "{}" - objectWithNoDeclaredPropsNullable: "{}" + objectWithNoDeclaredProps: {} + objectWithNoDeclaredPropsNullable: {} anyTypeProp: "" anyTypePropNullable: "" properties: @@ -2815,6 +2815,8 @@ components: Custom-Variableobject-Response: additionalProperties: true description: A Variable object without predefined property names + example: + key: "" type: object Field-pkiNotificationtestID: type: integer @@ -2822,8 +2824,8 @@ components: example: pkiNotificationtestID: 0 a_objVariableobject: - - null - - null + - key: "" + - key: "" properties: pkiNotificationtestID: type: integer diff --git a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/api/openapi.yaml b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/api/openapi.yaml index d8b36a9d220b..c690f13ee0aa 100644 --- a/samples/client/petstore/csharp/generichost/standard2.0/Petstore/api/openapi.yaml +++ b/samples/client/petstore/csharp/generichost/standard2.0/Petstore/api/openapi.yaml @@ -1459,8 +1459,8 @@ components: password: password phone: phone userStatus: 6 - objectWithNoDeclaredProps: "{}" - objectWithNoDeclaredPropsNullable: "{}" + objectWithNoDeclaredProps: {} + objectWithNoDeclaredPropsNullable: {} anyTypeProp: "" anyTypePropNullable: "" properties: @@ -2815,6 +2815,8 @@ components: Custom-Variableobject-Response: additionalProperties: true description: A Variable object without predefined property names + example: + key: "" type: object Field-pkiNotificationtestID: type: integer @@ -2822,8 +2824,8 @@ components: example: pkiNotificationtestID: 0 a_objVariableobject: - - null - - null + - key: "" + - key: "" properties: pkiNotificationtestID: type: integer diff --git a/samples/client/petstore/csharp/httpclient/net10/Petstore/api/openapi.yaml b/samples/client/petstore/csharp/httpclient/net10/Petstore/api/openapi.yaml index d8b36a9d220b..c690f13ee0aa 100644 --- a/samples/client/petstore/csharp/httpclient/net10/Petstore/api/openapi.yaml +++ b/samples/client/petstore/csharp/httpclient/net10/Petstore/api/openapi.yaml @@ -1459,8 +1459,8 @@ components: password: password phone: phone userStatus: 6 - objectWithNoDeclaredProps: "{}" - objectWithNoDeclaredPropsNullable: "{}" + objectWithNoDeclaredProps: {} + objectWithNoDeclaredPropsNullable: {} anyTypeProp: "" anyTypePropNullable: "" properties: @@ -2815,6 +2815,8 @@ components: Custom-Variableobject-Response: additionalProperties: true description: A Variable object without predefined property names + example: + key: "" type: object Field-pkiNotificationtestID: type: integer @@ -2822,8 +2824,8 @@ components: example: pkiNotificationtestID: 0 a_objVariableobject: - - null - - null + - key: "" + - key: "" properties: pkiNotificationtestID: type: integer diff --git a/samples/client/petstore/csharp/httpclient/net9/Petstore/api/openapi.yaml b/samples/client/petstore/csharp/httpclient/net9/Petstore/api/openapi.yaml index d8b36a9d220b..c690f13ee0aa 100644 --- a/samples/client/petstore/csharp/httpclient/net9/Petstore/api/openapi.yaml +++ b/samples/client/petstore/csharp/httpclient/net9/Petstore/api/openapi.yaml @@ -1459,8 +1459,8 @@ components: password: password phone: phone userStatus: 6 - objectWithNoDeclaredProps: "{}" - objectWithNoDeclaredPropsNullable: "{}" + objectWithNoDeclaredProps: {} + objectWithNoDeclaredPropsNullable: {} anyTypeProp: "" anyTypePropNullable: "" properties: @@ -2815,6 +2815,8 @@ components: Custom-Variableobject-Response: additionalProperties: true description: A Variable object without predefined property names + example: + key: "" type: object Field-pkiNotificationtestID: type: integer @@ -2822,8 +2824,8 @@ components: example: pkiNotificationtestID: 0 a_objVariableobject: - - null - - null + - key: "" + - key: "" properties: pkiNotificationtestID: type: integer diff --git a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/api/openapi.yaml b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/api/openapi.yaml index d8b36a9d220b..c690f13ee0aa 100644 --- a/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/api/openapi.yaml +++ b/samples/client/petstore/csharp/httpclient/standard2.0/Petstore/api/openapi.yaml @@ -1459,8 +1459,8 @@ components: password: password phone: phone userStatus: 6 - objectWithNoDeclaredProps: "{}" - objectWithNoDeclaredPropsNullable: "{}" + objectWithNoDeclaredProps: {} + objectWithNoDeclaredPropsNullable: {} anyTypeProp: "" anyTypePropNullable: "" properties: @@ -2815,6 +2815,8 @@ components: Custom-Variableobject-Response: additionalProperties: true description: A Variable object without predefined property names + example: + key: "" type: object Field-pkiNotificationtestID: type: integer @@ -2822,8 +2824,8 @@ components: example: pkiNotificationtestID: 0 a_objVariableobject: - - null - - null + - key: "" + - key: "" properties: pkiNotificationtestID: type: integer diff --git a/samples/client/petstore/csharp/restsharp/net10/Petstore/api/openapi.yaml b/samples/client/petstore/csharp/restsharp/net10/Petstore/api/openapi.yaml index eb7f61110c60..5e37e53ba7dc 100644 --- a/samples/client/petstore/csharp/restsharp/net10/Petstore/api/openapi.yaml +++ b/samples/client/petstore/csharp/restsharp/net10/Petstore/api/openapi.yaml @@ -1389,8 +1389,8 @@ components: password: password phone: phone userStatus: 6 - objectWithNoDeclaredProps: "{}" - objectWithNoDeclaredPropsNullable: "{}" + objectWithNoDeclaredProps: {} + objectWithNoDeclaredPropsNullable: {} anyTypeProp: "" anyTypePropNullable: "" properties: @@ -2704,6 +2704,8 @@ components: Custom-Variableobject-Response: additionalProperties: true description: A Variable object without predefined property names + example: + key: "" type: object Field-pkiNotificationtestID: type: integer @@ -2711,8 +2713,8 @@ components: example: pkiNotificationtestID: 0 a_objVariableobject: - - null - - null + - key: "" + - key: "" properties: pkiNotificationtestID: type: integer diff --git a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/api/openapi.yaml b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/api/openapi.yaml index 62fa8d98f5fa..aad15d537c32 100644 --- a/samples/client/petstore/csharp/restsharp/net4.7/Petstore/api/openapi.yaml +++ b/samples/client/petstore/csharp/restsharp/net4.7/Petstore/api/openapi.yaml @@ -1387,8 +1387,8 @@ components: password: password phone: phone userStatus: 6 - objectWithNoDeclaredProps: "{}" - objectWithNoDeclaredPropsNullable: "{}" + objectWithNoDeclaredProps: {} + objectWithNoDeclaredPropsNullable: {} anyTypeProp: "" anyTypePropNullable: "" properties: @@ -2702,6 +2702,8 @@ components: Custom-Variableobject-Response: additionalProperties: true description: A Variable object without predefined property names + example: + key: "" type: object Field-pkiNotificationtestID: type: integer @@ -2709,8 +2711,8 @@ components: example: pkiNotificationtestID: 0 a_objVariableobject: - - null - - null + - key: "" + - key: "" properties: pkiNotificationtestID: type: integer diff --git a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/api/openapi.yaml b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/api/openapi.yaml index 62fa8d98f5fa..aad15d537c32 100644 --- a/samples/client/petstore/csharp/restsharp/net4.8/Petstore/api/openapi.yaml +++ b/samples/client/petstore/csharp/restsharp/net4.8/Petstore/api/openapi.yaml @@ -1387,8 +1387,8 @@ components: password: password phone: phone userStatus: 6 - objectWithNoDeclaredProps: "{}" - objectWithNoDeclaredPropsNullable: "{}" + objectWithNoDeclaredProps: {} + objectWithNoDeclaredPropsNullable: {} anyTypeProp: "" anyTypePropNullable: "" properties: @@ -2702,6 +2702,8 @@ components: Custom-Variableobject-Response: additionalProperties: true description: A Variable object without predefined property names + example: + key: "" type: object Field-pkiNotificationtestID: type: integer @@ -2709,8 +2711,8 @@ components: example: pkiNotificationtestID: 0 a_objVariableobject: - - null - - null + - key: "" + - key: "" properties: pkiNotificationtestID: type: integer diff --git a/samples/client/petstore/csharp/restsharp/net8/EnumMappings/api/openapi.yaml b/samples/client/petstore/csharp/restsharp/net8/EnumMappings/api/openapi.yaml index 62fa8d98f5fa..aad15d537c32 100644 --- a/samples/client/petstore/csharp/restsharp/net8/EnumMappings/api/openapi.yaml +++ b/samples/client/petstore/csharp/restsharp/net8/EnumMappings/api/openapi.yaml @@ -1387,8 +1387,8 @@ components: password: password phone: phone userStatus: 6 - objectWithNoDeclaredProps: "{}" - objectWithNoDeclaredPropsNullable: "{}" + objectWithNoDeclaredProps: {} + objectWithNoDeclaredPropsNullable: {} anyTypeProp: "" anyTypePropNullable: "" properties: @@ -2702,6 +2702,8 @@ components: Custom-Variableobject-Response: additionalProperties: true description: A Variable object without predefined property names + example: + key: "" type: object Field-pkiNotificationtestID: type: integer @@ -2709,8 +2711,8 @@ components: example: pkiNotificationtestID: 0 a_objVariableobject: - - null - - null + - key: "" + - key: "" properties: pkiNotificationtestID: type: integer diff --git a/samples/client/petstore/csharp/restsharp/net8/Petstore/api/openapi.yaml b/samples/client/petstore/csharp/restsharp/net8/Petstore/api/openapi.yaml index d8b36a9d220b..c690f13ee0aa 100644 --- a/samples/client/petstore/csharp/restsharp/net8/Petstore/api/openapi.yaml +++ b/samples/client/petstore/csharp/restsharp/net8/Petstore/api/openapi.yaml @@ -1459,8 +1459,8 @@ components: password: password phone: phone userStatus: 6 - objectWithNoDeclaredProps: "{}" - objectWithNoDeclaredPropsNullable: "{}" + objectWithNoDeclaredProps: {} + objectWithNoDeclaredPropsNullable: {} anyTypeProp: "" anyTypePropNullable: "" properties: @@ -2815,6 +2815,8 @@ components: Custom-Variableobject-Response: additionalProperties: true description: A Variable object without predefined property names + example: + key: "" type: object Field-pkiNotificationtestID: type: integer @@ -2822,8 +2824,8 @@ components: example: pkiNotificationtestID: 0 a_objVariableobject: - - null - - null + - key: "" + - key: "" properties: pkiNotificationtestID: type: integer diff --git a/samples/client/petstore/csharp/restsharp/net9/EnumMappings/api/openapi.yaml b/samples/client/petstore/csharp/restsharp/net9/EnumMappings/api/openapi.yaml index 62fa8d98f5fa..aad15d537c32 100644 --- a/samples/client/petstore/csharp/restsharp/net9/EnumMappings/api/openapi.yaml +++ b/samples/client/petstore/csharp/restsharp/net9/EnumMappings/api/openapi.yaml @@ -1387,8 +1387,8 @@ components: password: password phone: phone userStatus: 6 - objectWithNoDeclaredProps: "{}" - objectWithNoDeclaredPropsNullable: "{}" + objectWithNoDeclaredProps: {} + objectWithNoDeclaredPropsNullable: {} anyTypeProp: "" anyTypePropNullable: "" properties: @@ -2702,6 +2702,8 @@ components: Custom-Variableobject-Response: additionalProperties: true description: A Variable object without predefined property names + example: + key: "" type: object Field-pkiNotificationtestID: type: integer @@ -2709,8 +2711,8 @@ components: example: pkiNotificationtestID: 0 a_objVariableobject: - - null - - null + - key: "" + - key: "" properties: pkiNotificationtestID: type: integer diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/api/openapi.yaml b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/api/openapi.yaml index d8b36a9d220b..c690f13ee0aa 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/api/openapi.yaml +++ b/samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/api/openapi.yaml @@ -1459,8 +1459,8 @@ components: password: password phone: phone userStatus: 6 - objectWithNoDeclaredProps: "{}" - objectWithNoDeclaredPropsNullable: "{}" + objectWithNoDeclaredProps: {} + objectWithNoDeclaredPropsNullable: {} anyTypeProp: "" anyTypePropNullable: "" properties: @@ -2815,6 +2815,8 @@ components: Custom-Variableobject-Response: additionalProperties: true description: A Variable object without predefined property names + example: + key: "" type: object Field-pkiNotificationtestID: type: integer @@ -2822,8 +2824,8 @@ components: example: pkiNotificationtestID: 0 a_objVariableobject: - - null - - null + - key: "" + - key: "" properties: pkiNotificationtestID: type: integer diff --git a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/api/openapi.yaml b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/api/openapi.yaml index eb7f61110c60..5e37e53ba7dc 100644 --- a/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/api/openapi.yaml +++ b/samples/client/petstore/csharp/restsharp/standard2.0/Petstore/api/openapi.yaml @@ -1389,8 +1389,8 @@ components: password: password phone: phone userStatus: 6 - objectWithNoDeclaredProps: "{}" - objectWithNoDeclaredPropsNullable: "{}" + objectWithNoDeclaredProps: {} + objectWithNoDeclaredPropsNullable: {} anyTypeProp: "" anyTypePropNullable: "" properties: @@ -2704,6 +2704,8 @@ components: Custom-Variableobject-Response: additionalProperties: true description: A Variable object without predefined property names + example: + key: "" type: object Field-pkiNotificationtestID: type: integer @@ -2711,8 +2713,8 @@ components: example: pkiNotificationtestID: 0 a_objVariableobject: - - null - - null + - key: "" + - key: "" properties: pkiNotificationtestID: type: integer diff --git a/samples/client/petstore/csharp/unityWebRequest/net10/Petstore/api/openapi.yaml b/samples/client/petstore/csharp/unityWebRequest/net10/Petstore/api/openapi.yaml index d8b36a9d220b..c690f13ee0aa 100644 --- a/samples/client/petstore/csharp/unityWebRequest/net10/Petstore/api/openapi.yaml +++ b/samples/client/petstore/csharp/unityWebRequest/net10/Petstore/api/openapi.yaml @@ -1459,8 +1459,8 @@ components: password: password phone: phone userStatus: 6 - objectWithNoDeclaredProps: "{}" - objectWithNoDeclaredPropsNullable: "{}" + objectWithNoDeclaredProps: {} + objectWithNoDeclaredPropsNullable: {} anyTypeProp: "" anyTypePropNullable: "" properties: @@ -2815,6 +2815,8 @@ components: Custom-Variableobject-Response: additionalProperties: true description: A Variable object without predefined property names + example: + key: "" type: object Field-pkiNotificationtestID: type: integer @@ -2822,8 +2824,8 @@ components: example: pkiNotificationtestID: 0 a_objVariableobject: - - null - - null + - key: "" + - key: "" properties: pkiNotificationtestID: type: integer diff --git a/samples/client/petstore/csharp/unityWebRequest/net9/Petstore/api/openapi.yaml b/samples/client/petstore/csharp/unityWebRequest/net9/Petstore/api/openapi.yaml index d8b36a9d220b..c690f13ee0aa 100644 --- a/samples/client/petstore/csharp/unityWebRequest/net9/Petstore/api/openapi.yaml +++ b/samples/client/petstore/csharp/unityWebRequest/net9/Petstore/api/openapi.yaml @@ -1459,8 +1459,8 @@ components: password: password phone: phone userStatus: 6 - objectWithNoDeclaredProps: "{}" - objectWithNoDeclaredPropsNullable: "{}" + objectWithNoDeclaredProps: {} + objectWithNoDeclaredPropsNullable: {} anyTypeProp: "" anyTypePropNullable: "" properties: @@ -2815,6 +2815,8 @@ components: Custom-Variableobject-Response: additionalProperties: true description: A Variable object without predefined property names + example: + key: "" type: object Field-pkiNotificationtestID: type: integer @@ -2822,8 +2824,8 @@ components: example: pkiNotificationtestID: 0 a_objVariableobject: - - null - - null + - key: "" + - key: "" properties: pkiNotificationtestID: type: integer diff --git a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/api/openapi.yaml b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/api/openapi.yaml index d8b36a9d220b..c690f13ee0aa 100644 --- a/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/api/openapi.yaml +++ b/samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/api/openapi.yaml @@ -1459,8 +1459,8 @@ components: password: password phone: phone userStatus: 6 - objectWithNoDeclaredProps: "{}" - objectWithNoDeclaredPropsNullable: "{}" + objectWithNoDeclaredProps: {} + objectWithNoDeclaredPropsNullable: {} anyTypeProp: "" anyTypePropNullable: "" properties: @@ -2815,6 +2815,8 @@ components: Custom-Variableobject-Response: additionalProperties: true description: A Variable object without predefined property names + example: + key: "" type: object Field-pkiNotificationtestID: type: integer @@ -2822,8 +2824,8 @@ components: example: pkiNotificationtestID: 0 a_objVariableobject: - - null - - null + - key: "" + - key: "" properties: pkiNotificationtestID: type: integer diff --git a/samples/client/petstore/java/jersey3-jackson3/api/openapi.yaml b/samples/client/petstore/java/jersey3-jackson3/api/openapi.yaml index c336960b860c..bb867da57d51 100644 --- a/samples/client/petstore/java/jersey3-jackson3/api/openapi.yaml +++ b/samples/client/petstore/java/jersey3-jackson3/api/openapi.yaml @@ -1370,8 +1370,8 @@ components: password: password phone: phone userStatus: 6 - objectWithNoDeclaredProps: "{}" - objectWithNoDeclaredPropsNullable: "{}" + objectWithNoDeclaredProps: {} + objectWithNoDeclaredPropsNullable: {} anyTypeProp: "" anyTypePropNullable: "" properties: diff --git a/samples/client/petstore/java/jersey3/api/openapi.yaml b/samples/client/petstore/java/jersey3/api/openapi.yaml index c336960b860c..bb867da57d51 100644 --- a/samples/client/petstore/java/jersey3/api/openapi.yaml +++ b/samples/client/petstore/java/jersey3/api/openapi.yaml @@ -1370,8 +1370,8 @@ components: password: password phone: phone userStatus: 6 - objectWithNoDeclaredProps: "{}" - objectWithNoDeclaredPropsNullable: "{}" + objectWithNoDeclaredProps: {} + objectWithNoDeclaredPropsNullable: {} anyTypeProp: "" anyTypePropNullable: "" properties: diff --git a/samples/client/petstore/java/native-async/api/openapi.yaml b/samples/client/petstore/java/native-async/api/openapi.yaml index c999de47bc75..9ecb24b21d31 100644 --- a/samples/client/petstore/java/native-async/api/openapi.yaml +++ b/samples/client/petstore/java/native-async/api/openapi.yaml @@ -1381,8 +1381,8 @@ components: password: password phone: phone userStatus: 6 - objectWithNoDeclaredProps: "{}" - objectWithNoDeclaredPropsNullable: "{}" + objectWithNoDeclaredProps: {} + objectWithNoDeclaredPropsNullable: {} anyTypeProp: "" anyTypePropNullable: "" properties: diff --git a/samples/client/petstore/java/native-jackson3/api/openapi.yaml b/samples/client/petstore/java/native-jackson3/api/openapi.yaml index c999de47bc75..9ecb24b21d31 100644 --- a/samples/client/petstore/java/native-jackson3/api/openapi.yaml +++ b/samples/client/petstore/java/native-jackson3/api/openapi.yaml @@ -1381,8 +1381,8 @@ components: password: password phone: phone userStatus: 6 - objectWithNoDeclaredProps: "{}" - objectWithNoDeclaredPropsNullable: "{}" + objectWithNoDeclaredProps: {} + objectWithNoDeclaredPropsNullable: {} anyTypeProp: "" anyTypePropNullable: "" properties: diff --git a/samples/client/petstore/java/native/api/openapi.yaml b/samples/client/petstore/java/native/api/openapi.yaml index c999de47bc75..9ecb24b21d31 100644 --- a/samples/client/petstore/java/native/api/openapi.yaml +++ b/samples/client/petstore/java/native/api/openapi.yaml @@ -1381,8 +1381,8 @@ components: password: password phone: phone userStatus: 6 - objectWithNoDeclaredProps: "{}" - objectWithNoDeclaredPropsNullable: "{}" + objectWithNoDeclaredProps: {} + objectWithNoDeclaredPropsNullable: {} anyTypeProp: "" anyTypePropNullable: "" properties: diff --git a/samples/client/petstore/java/okhttp-gson-3.1/api/openapi.yaml b/samples/client/petstore/java/okhttp-gson-3.1/api/openapi.yaml index ea3eaa285ad4..6160e26ce01d 100644 --- a/samples/client/petstore/java/okhttp-gson-3.1/api/openapi.yaml +++ b/samples/client/petstore/java/okhttp-gson-3.1/api/openapi.yaml @@ -1191,6 +1191,7 @@ components: allOf: - $ref: "#/components/schemas/SimpleModelWithArrayProperty" myObject: + example: {} type: object SelfReference: items: {} diff --git a/samples/client/petstore/java/okhttp-gson/api/openapi.yaml b/samples/client/petstore/java/okhttp-gson/api/openapi.yaml index ec6b0d631c06..55552d3bd480 100644 --- a/samples/client/petstore/java/okhttp-gson/api/openapi.yaml +++ b/samples/client/petstore/java/okhttp-gson/api/openapi.yaml @@ -1652,8 +1652,8 @@ components: password: password phone: phone userStatus: 6 - objectWithNoDeclaredProps: "{}" - objectWithNoDeclaredPropsNullable: "{}" + objectWithNoDeclaredProps: {} + objectWithNoDeclaredPropsNullable: {} anyTypeProp: "" anyTypePropNullable: "" properties: @@ -2943,20 +2943,20 @@ components: date_prop: 2000-01-23 datetime_prop: 2000-01-23T04:56:07.000+00:00 array_nullable_prop: - - "{}" - - "{}" + - {} + - {} array_and_items_nullable_prop: - - "{}" - - "{}" + - {} + - {} array_items_nullable: - - "{}" - - "{}" + - {} + - {} object_nullable_prop: - key: "{}" + key: {} object_and_items_nullable_prop: - key: "{}" + key: {} object_items_nullable: - key: "{}" + key: {} custom_ref_enum: custom custom_enum: custom NestedArrayWithDefaultValues: 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 1785e5b472ee..e4ea6039cd19 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/api/openapi.yaml +++ b/samples/openapi3/client/petstore/go/go-petstore/api/openapi.yaml @@ -1467,8 +1467,8 @@ components: password: password phone: phone userStatus: 6 - arbitraryObject: "{}" - arbitraryNullableObject: "{}" + arbitraryObject: {} + arbitraryNullableObject: {} arbitraryTypeValue: "" arbitraryNullableTypeValue: "" properties: 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 c336960b860c..bb867da57d51 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/api/openapi.yaml +++ b/samples/openapi3/client/petstore/java/jersey2-java8/api/openapi.yaml @@ -1370,8 +1370,8 @@ components: password: password phone: phone userStatus: 6 - objectWithNoDeclaredProps: "{}" - objectWithNoDeclaredPropsNullable: "{}" + objectWithNoDeclaredProps: {} + objectWithNoDeclaredPropsNullable: {} anyTypeProp: "" anyTypePropNullable: "" properties: diff --git a/samples/server/petstore/rust-server/output/openapi-v3/api/openapi.yaml b/samples/server/petstore/rust-server/output/openapi-v3/api/openapi.yaml index 141277d11168..8001a257f083 100644 --- a/samples/server/petstore/rust-server/output/openapi-v3/api/openapi.yaml +++ b/samples/server/petstore/rust-server/output/openapi-v3/api/openapi.yaml @@ -655,6 +655,9 @@ components: schemas: AnyOfProperty: description: Test containing an anyOf object + example: + requiredAnyOf: FOO + optionalAnyOf: FOO properties: requiredAnyOf: $ref: "#/components/schemas/AnyOfObject" @@ -667,6 +670,10 @@ components: $ref: "#/components/schemas/AnyOfProperty" description: Check that an object with only additional properties that references another object (e.g. an anyOf object) isn't treated as freeForm + example: + key: + requiredAnyOf: FOO + optionalAnyOf: FOO type: object AnyOfObject: anyOf: